fix: contact the actual endpoint for finishing

This commit is contained in:
Matyáš Caras 2024-07-30 17:37:14 +02:00
parent 35bf0c3452
commit 7705280094
Signed by: hernik
GPG key ID: 2A3175F98820C5C6
2 changed files with 4 additions and 3 deletions

3
dist/index.js vendored
View file

@ -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");

View file

@ -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,
);