From 77052800943f5486de248583f432620fcb59d714 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maty=C3=A1=C5=A1=20Caras?= Date: Tue, 30 Jul 2024 17:37:14 +0200 Subject: [PATCH] fix: contact the actual endpoint for finishing --- dist/index.js | 3 ++- src/index.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dist/index.js b/dist/index.js index 5e63fdd..1f423f1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -45412,7 +45412,8 @@ try { console.log("Comment found, but no Freelo task ID identified"); break; } - const res = await axios_default.post(`${apiEndpoint}/task/${taskId2[1]}`, null, defaultOptions); + console.log(`${apiEndpoint}/task/${taskId2[1]}/finish`); + const res = await axios_default.post(`${apiEndpoint}/task/${taskId2[1]}/finish`, null, defaultOptions); if (res.status > 399) { console.error(res.data); throw new Error("Got an error response from Freelo API"); diff --git a/src/index.ts b/src/index.ts index 9c9ff4d..0510778 100644 --- a/src/index.ts +++ b/src/index.ts @@ -147,9 +147,9 @@ try { console.log("Comment found, but no Freelo task ID identified"); break; } - + console.log(`${apiEndpoint}/task/${taskId[1]}/finish`) const res = await axios.post( - `${apiEndpoint}/task/${taskId[1]}`, + `${apiEndpoint}/task/${taskId[1]}/finish`, null, defaultOptions, );