mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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[] = [];
|
||||
|
||||
let responseData;
|
||||
let uri;
|
||||
query.limit = 100;
|
||||
query.offset = 0;
|
||||
|
||||
do {
|
||||
responseData = await pagerDutyApiRequest.call(this, method, endpoint, body, query, uri);
|
||||
responseData = await pagerDutyApiRequest.call(this, method, endpoint, body, query);
|
||||
query.offset++;
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
} while (
|
||||
@@ -91,4 +90,3 @@ export function keysToSnakeCase(elements: IDataObject[] | IDataObject) : IDataOb
|
||||
}
|
||||
return elements;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
IDataObject,
|
||||
} from "n8n-workflow";
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export interface IIncident {
|
||||
assignments?: IDataObject[];
|
||||
|
||||
@@ -5,16 +5,16 @@ import {
|
||||
import {
|
||||
IDataObject,
|
||||
ILoadOptionsFunctions,
|
||||
INodeTypeDescription,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodePropertyOptions,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
keysToSnakeCase,
|
||||
pagerDutyApiRequest,
|
||||
pagerDutyApiRequestAllItems,
|
||||
keysToSnakeCase,
|
||||
} from './GenericFunctions';
|
||||
|
||||
import {
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
import {
|
||||
logEntryFields,
|
||||
logEntryOperations,
|
||||
} from './logEntryDescription';
|
||||
} from './LogEntryDescription';
|
||||
|
||||
import {
|
||||
IIncident,
|
||||
@@ -345,7 +345,7 @@ export class PagerDuty implements INodeType {
|
||||
responseData = await pagerDutyApiRequestAllItems.call(this, 'log_entries', 'GET', '/log_entries', {}, qs);
|
||||
} else {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 330 B |
Reference in New Issue
Block a user