From a3802a68ed0477d96c1b8853eb559fee6e49695a Mon Sep 17 00:00:00 2001 From: Dan Mills Date: Mon, 2 Feb 2009 11:44:07 -0800 Subject: [PATCH] server returns a json object for user root now, modify checkLogin() accordingly --- services/sync/modules/service.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/services/sync/modules/service.js b/services/sync/modules/service.js index 64842776bde..6b581b0fdcf 100644 --- a/services/sync/modules/service.js +++ b/services/sync/modules/service.js @@ -421,8 +421,7 @@ WeaveSvc.prototype = { this._log.debug("Verifying login for user " + user); let res = new Resource(this.baseURL + user); yield res.get(self.cb); - if (res.data != "\"1\"") - throw "Login failed"; + Svc.Json.decode(res.data); // will throw if not json self.done(true); }; this._notify("verify-login", "", fn).async(this, onComplete);