mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
⚡ Minor improvements to PagerDuty-Node
This commit is contained in:
@@ -62,12 +62,11 @@ export async function pagerDutyApiRequestAllItems(this: IExecuteFunctions | ILoa
|
|||||||
const returnData: IDataObject[] = [];
|
const returnData: IDataObject[] = [];
|
||||||
|
|
||||||
let responseData;
|
let responseData;
|
||||||
let uri;
|
|
||||||
query.limit = 100;
|
query.limit = 100;
|
||||||
query.offset = 0;
|
query.offset = 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
responseData = await pagerDutyApiRequest.call(this, method, endpoint, body, query, uri);
|
responseData = await pagerDutyApiRequest.call(this, method, endpoint, body, query);
|
||||||
query.offset++;
|
query.offset++;
|
||||||
returnData.push.apply(returnData, responseData[propertyName]);
|
returnData.push.apply(returnData, responseData[propertyName]);
|
||||||
} while (
|
} while (
|
||||||
@@ -91,4 +90,3 @@ export function keysToSnakeCase(elements: IDataObject[] | IDataObject) : IDataOb
|
|||||||
}
|
}
|
||||||
return elements;
|
return elements;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
INodeProperties,
|
INodeProperties,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export const incidentOperations = [
|
export const incidentOperations = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
IDataObject,
|
IDataObject,
|
||||||
} from "n8n-workflow";
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export interface IIncident {
|
export interface IIncident {
|
||||||
assignments?: IDataObject[];
|
assignments?: IDataObject[];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
INodeProperties,
|
INodeProperties,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
export const incidentNoteOperations = [
|
export const incidentNoteOperations = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,16 +5,16 @@ import {
|
|||||||
import {
|
import {
|
||||||
IDataObject,
|
IDataObject,
|
||||||
ILoadOptionsFunctions,
|
ILoadOptionsFunctions,
|
||||||
INodeTypeDescription,
|
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodeType,
|
|
||||||
INodePropertyOptions,
|
INodePropertyOptions,
|
||||||
|
INodeType,
|
||||||
|
INodeTypeDescription,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
keysToSnakeCase,
|
||||||
pagerDutyApiRequest,
|
pagerDutyApiRequest,
|
||||||
pagerDutyApiRequestAllItems,
|
pagerDutyApiRequestAllItems,
|
||||||
keysToSnakeCase,
|
|
||||||
} from './GenericFunctions';
|
} from './GenericFunctions';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -30,7 +30,7 @@ import {
|
|||||||
import {
|
import {
|
||||||
logEntryFields,
|
logEntryFields,
|
||||||
logEntryOperations,
|
logEntryOperations,
|
||||||
} from './logEntryDescription';
|
} from './LogEntryDescription';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IIncident,
|
IIncident,
|
||||||
@@ -345,7 +345,7 @@ export class PagerDuty implements INodeType {
|
|||||||
responseData = await pagerDutyApiRequestAllItems.call(this, 'log_entries', 'GET', '/log_entries', {}, qs);
|
responseData = await pagerDutyApiRequestAllItems.call(this, 'log_entries', 'GET', '/log_entries', {}, qs);
|
||||||
} else {
|
} else {
|
||||||
qs.limit = this.getNodeParameter('limit', 0) as number;
|
qs.limit = this.getNodeParameter('limit', 0) as number;
|
||||||
responseData = await pagerDutyApiRequest.call(this, 'GET', 'log_entries', {}, qs);
|
responseData = await pagerDutyApiRequest.call(this, 'GET', '/log_entries', {}, qs);
|
||||||
responseData = responseData.log_entries;
|
responseData = responseData.log_entries;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 330 B |
Reference in New Issue
Block a user