Minor improvements to ClickUp-Node

This commit is contained in:
Jan Oberhauser 2020-10-10 19:12:19 +02:00
parent 15c0eae56d
commit edd2d39fb1
2 changed files with 49 additions and 38 deletions

View file

@ -1140,7 +1140,12 @@ export class ClickUp implements INodeType {
if (operation === 'stop') { if (operation === 'stop') {
const teamId = this.getNodeParameter('team', i) as string; const teamId = this.getNodeParameter('team', i) as string;
responseData = await clickupApiRequest.call(this, 'POST', `/team/${teamId}/time_entries/stop`); responseData = await clickupApiRequest.call(this, 'POST', `/team/${teamId}/time_entries/stop`);
if (responseData.data) {
responseData = responseData.data; responseData = responseData.data;
} else {
throw new Error('There seems to be nothing to stop.');
}
} }
if (operation === 'delete') { if (operation === 'delete') {
const teamId = this.getNodeParameter('team', i) as string; const teamId = this.getNodeParameter('team', i) as string;

View file

@ -153,6 +153,7 @@ export const timeEntryFields = [
}, },
], ],
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* timeEntry:get */ /* timeEntry:get */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
@ -213,6 +214,7 @@ export const timeEntryFields = [
}, },
required: true, required: true,
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* timeEntry:create */ /* timeEntry:create */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
@ -467,6 +469,7 @@ export const timeEntryFields = [
}, },
], ],
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* timeEntry:start */ /* timeEntry:start */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
@ -539,6 +542,7 @@ export const timeEntryFields = [
}, },
], ],
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* timeEntry:stop */ /* timeEntry:stop */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
@ -562,6 +566,7 @@ export const timeEntryFields = [
}, },
required: true, required: true,
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* timeEntry:delete */ /* timeEntry:delete */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
@ -602,6 +607,7 @@ export const timeEntryFields = [
}, },
required: true, required: true,
}, },
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* timeEntry:update */ /* timeEntry:update */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */