From d99928908eec9949ba34c30aeb4c924096291d5e Mon Sep 17 00:00:00 2001 From: Jeena Date: Thu, 22 May 2014 19:43:42 +0200 Subject: [PATCH] added method to logOut doOperation --- js/Pond.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/Pond.js b/js/Pond.js index 501494c..94e5485 100644 --- a/js/Pond.js +++ b/js/Pond.js @@ -106,6 +106,8 @@ Pond.prototype.getUnreadFeeds = function(callback, skip) { Pond.prototype.getFeeds = function(callback) { var _this = this; this.doOperation("GET", "subscriptions", {}, function(feeds) { + + if(!feeds) return; _this.feeds = {}; for (var i = 0; i < feeds.length; i++) { @@ -193,7 +195,7 @@ Pond.prototype.setArticleUnstarred = function(articles, callback) { } Pond.prototype.logOut = function() { - this.doOperation("auth/sessions/" + this.session_token ); + this.doOperation("DELETE", "auth/sessions/" + this.session_token ); localStorage.feeds = null; }