Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

Updated habitapi call to include URL, resolving #57 and #59 #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions habitSync.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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([
Expand Down