added method to logOut doOperation

This commit is contained in:
Jeena 2014-05-22 19:43:42 +02:00
parent 2267e54cd4
commit d99928908e

View file

@ -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;
} }