mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
🐛 Fix Clockify Trigger bug (#1778)
* Fix the empty results bug * Fix return value
This commit is contained in:
@@ -24,7 +24,7 @@ export class ClockifyTrigger implements INodeType {
|
|||||||
displayName: 'Clockify Trigger',
|
displayName: 'Clockify Trigger',
|
||||||
icon: 'file:clockify.png',
|
icon: 'file:clockify.png',
|
||||||
name: 'clockifyTrigger',
|
name: 'clockifyTrigger',
|
||||||
group: ['trigger'],
|
group: [ 'trigger' ],
|
||||||
version: 1,
|
version: 1,
|
||||||
description: 'Watches Clockify For Events',
|
description: 'Watches Clockify For Events',
|
||||||
defaults: {
|
defaults: {
|
||||||
@@ -32,7 +32,7 @@ export class ClockifyTrigger implements INodeType {
|
|||||||
color: '#000000',
|
color: '#000000',
|
||||||
},
|
},
|
||||||
inputs: [],
|
inputs: [],
|
||||||
outputs: ['main'],
|
outputs: [ 'main' ],
|
||||||
credentials: [
|
credentials: [
|
||||||
{
|
{
|
||||||
name: 'clockifyApi',
|
name: 'clockifyApi',
|
||||||
@@ -109,7 +109,7 @@ export class ClockifyTrigger implements INodeType {
|
|||||||
qs.start = webhookData.lastTimeChecked;
|
qs.start = webhookData.lastTimeChecked;
|
||||||
qs.end = moment().tz(workflowTimezone).format('YYYY-MM-DDTHH:mm:ss') + 'Z';
|
qs.end = moment().tz(workflowTimezone).format('YYYY-MM-DDTHH:mm:ss') + 'Z';
|
||||||
qs.hydrated = true;
|
qs.hydrated = true;
|
||||||
qs['in-progress'] = false;
|
qs[ 'in-progress' ] = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,8 +117,8 @@ export class ClockifyTrigger implements INodeType {
|
|||||||
webhookData.lastTimeChecked = qs.end;
|
webhookData.lastTimeChecked = qs.end;
|
||||||
|
|
||||||
if (Array.isArray(result) && result.length !== 0) {
|
if (Array.isArray(result) && result.length !== 0) {
|
||||||
result = [this.helpers.returnJsonArray(result)];
|
return [ this.helpers.returnJsonArray(result) ];
|
||||||
}
|
}
|
||||||
return result;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user