summaryrefslogtreecommitdiffstats
path: root/js/service/ItemResource.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/service/ItemResource.js')
-rw-r--r--js/service/ItemResource.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/js/service/ItemResource.js b/js/service/ItemResource.js
index a25d6c3e7..c988e6729 100644
--- a/js/service/ItemResource.js
+++ b/js/service/ItemResource.js
@@ -11,7 +11,6 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL,
ITEM_BATCH_SIZE) {
'use strict';
-
var ItemResource = function ($http, BASE_URL, ITEM_BATCH_SIZE) {
Resource.call(this, $http, BASE_URL);
this.starredCount = 0;
@@ -131,7 +130,9 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL,
item.unread = !read;
});
- return this.http.post(this.BASE_URL + '/feeds/' + feedId + '/read');
+ return this.http.post(this.BASE_URL + '/feeds/' + feedId + '/read', {
+ highestItemId: this.getNewestItemId()
+ });
};
@@ -140,7 +141,13 @@ app.factory('ItemResource', function (Resource, $http, BASE_URL,
item.unread = false;
});
- return this.http.post(this.BASE_URL + '/items/read');
+ return this.http({
+ url: this.BASE_URL + '/items/read',
+ method: 'POST',
+ data: {
+ highestItemId: this.getNewestItemId()
+ }
+ });
};