kusold / todoist-habitrpg

One way sync from Todoist -> HabitRPG
120 stars 14 forks source link

error: { [Error: cannot POST /api/v3/tasks/user (404)] status: 404, method: 'POST', path: '/api/v3/tasks/user' }, #57

Open ajfclark opened 7 years ago

ajfclark commented 7 years ago

Habitica API appears to have changed. All tasks fail to sync with a 404 message.

This seems to be an issue in the habitrpg-api library. I updated line 14 of /usr/local/lib/node_modules/todoist-habitrpg/node_modules/habitrpg-api to:

this.apiUrl = apiUrl || 'https://habitica.com/api/v3';

And the tasks seem to be syncing correctly again.

It does seem to be possible to set the apiURL without editing the library. I'll see if I cna track down where to make that change.

ajfclark commented 7 years ago

Ok, updating line 152 of habitSync.js from:

  var habit = new habitapi(self.uid, self.token, null, 'v2');

to:

  var habit = new habitapi(self.uid, self.token, 'https://habitica.com/api/v3', 'v2');

Allows sync to continue.