From 69c15be5190c23d175f9ea152186777aa5fc6b17 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Fri, 27 Jan 2017 10:37:07 +1100 Subject: [PATCH 1/2] Updated habitrpg call to include URL, resolving #57 in upstream. --- habitSync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/habitSync.js b/habitSync.js index 34ad45a..9927273 100644 --- a/habitSync.js +++ b/habitSync.js @@ -142,7 +142,7 @@ habitSync.prototype.getTodoistSync = function(cb) { habitSync.prototype.syncItemsToHabitRpg = function(items, cb) { var self = this - var habit = new habitapi(self.uid, self.token, null, 'v2'); + var habit = new habitapi(self.uid, self.token, 'https://habitica.com/api/v3', 'v2'); // Cannot execute in parallel. See: https://github.com/HabitRPG/habitrpg/issues/2301 async.eachSeries(items, function(item, next) { async.waterfall([ From 6262978498ce118bf492ed522003ccbcf753cf99 Mon Sep 17 00:00:00 2001 From: Andrew Clark Date: Tue, 7 Feb 2017 11:33:24 +1100 Subject: [PATCH 2/2] Update habitapi in updateHistoryForTodoistItems to use explict api url --- habitSync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/habitSync.js b/habitSync.js index 9927273..33ad0d4 100644 --- a/habitSync.js +++ b/habitSync.js @@ -98,7 +98,7 @@ habitSync.prototype.findTasksThatNeedUpdating = function(newHistory, oldHistory) habitSync.prototype.updateHistoryForTodoistItems = function(items) { var self = this; - var habit = new habitapi(self.uid, self.token, null, 'v2'); + var habit = new habitapi(self.uid, self.token, 'https://habitica.com/api/v3', 'v2'); _.forEach(items, function(item) { if(history.tasks[item.id]) { if(item.is_deleted) {