mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Forbid raw enums (no-changelog)
This commit is contained in:
@@ -13,7 +13,8 @@ import type {
|
||||
|
||||
import { todoistApiRequest } from '../GenericFunctions';
|
||||
|
||||
import { OperationType, TodoistService } from './Service';
|
||||
import type { OperationType } from './Service';
|
||||
import { TodoistService } from './Service';
|
||||
|
||||
// interface IBodyCreateTask {
|
||||
// content?: string;
|
||||
@@ -702,15 +703,11 @@ export class TodoistV1 implements INodeType {
|
||||
const service = new TodoistService();
|
||||
let responseData;
|
||||
const resource = this.getNodeParameter('resource', 0);
|
||||
const operation = this.getNodeParameter('operation', 0);
|
||||
const operation = this.getNodeParameter('operation', 0) as OperationType;
|
||||
for (let i = 0; i < length; i++) {
|
||||
try {
|
||||
if (resource === 'task') {
|
||||
responseData = await service.execute(
|
||||
this,
|
||||
OperationType[operation as keyof typeof OperationType],
|
||||
i,
|
||||
);
|
||||
responseData = await service.execute(this, operation, i);
|
||||
}
|
||||
if (Array.isArray(responseData?.data)) {
|
||||
returnData.push.apply(returnData, responseData?.data as IDataObject[]);
|
||||
|
||||
Reference in New Issue
Block a user