From 52197d3a389be111a6800e7c8d1136e80f829217 Mon Sep 17 00:00:00 2001 From: Sebastian Gierlinger Date: Sat, 19 Apr 2014 17:03:20 +0200 Subject: [PATCH] Post response move pagination -> meta MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #2604 - moved ‚pagination‘ to ‚meta‘ property - added response test for pagination property - changed ‚next‘ and ‚prev‘ to be set to null and exist on every response - removed unnecessary call to API for RSS author --- ghost/admin/models/post.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ghost/admin/models/post.js b/ghost/admin/models/post.js index 26f5c792fa..f39a1b3280 100644 --- a/ghost/admin/models/post.js +++ b/ghost/admin/models/post.js @@ -67,12 +67,12 @@ parse: function (resp) { if (_.isArray(resp.posts)) { - this.limit = resp.limit; - this.currentPage = resp.page; - this.totalPages = resp.pages; - this.totalPosts = resp.total; - this.nextPage = resp.next; - this.prevPage = resp.prev; + this.limit = resp.meta.pagination.limit; + this.currentPage = resp.meta.pagination.page; + this.totalPages = resp.meta.pagination.pages; + this.totalPosts = resp.meta.pagination.total; + this.nextPage = resp.meta.pagination.next; + this.prevPage = resp.meta.pagination.prev; return resp.posts; } return resp;