added method to logOut doOperation
This commit is contained in:
parent
2267e54cd4
commit
d99928908e
1 changed files with 3 additions and 1 deletions
|
@ -107,6 +107,8 @@ Pond.prototype.getFeeds = function(callback) {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
this.doOperation("GET", "subscriptions", {}, function(feeds) {
|
this.doOperation("GET", "subscriptions", {}, function(feeds) {
|
||||||
|
|
||||||
|
if(!feeds) return;
|
||||||
|
|
||||||
_this.feeds = {};
|
_this.feeds = {};
|
||||||
for (var i = 0; i < feeds.length; i++) {
|
for (var i = 0; i < feeds.length; i++) {
|
||||||
var feed = feeds[i];
|
var feed = feeds[i];
|
||||||
|
@ -193,7 +195,7 @@ Pond.prototype.setArticleUnstarred = function(articles, callback) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Pond.prototype.logOut = function() {
|
Pond.prototype.logOut = function() {
|
||||||
this.doOperation("auth/sessions/" + this.session_token );
|
this.doOperation("DELETE", "auth/sessions/" + this.session_token );
|
||||||
localStorage.feeds = null;
|
localStorage.feeds = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue