From 3c2185a3bfbfc8de9ee2b63c602af9fb4ec376a5 Mon Sep 17 00:00:00 2001 From: Naz Gargol Date: Wed, 18 Sep 2019 16:11:35 +0200 Subject: [PATCH] Removed unnecessary '?status=all' query parameter (#1330) no issue - The default post/user filter gets expanded to same values as for ALL_STATUSES in Ghost APIs model layer (https://github.com/TryGhost/Ghost/blob/e57e19e/core/server/api/canary/utils/serializers/input/posts.js#L97) --- ghost/admin/app/components/gh-search-input.js | 4 ++-- ghost/admin/app/routes/editor/edit.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ghost/admin/app/components/gh-search-input.js b/ghost/admin/app/components/gh-search-input.js index ea18512ac9..3f595029f0 100644 --- a/ghost/admin/app/components/gh-search-input.js +++ b/ghost/admin/app/components/gh-search-input.js @@ -161,7 +161,7 @@ export default Component.extend({ _loadPosts() { let store = this.store; let postsUrl = `${store.adapterFor('post').urlForQuery({}, 'post')}/`; - let postsQuery = {fields: 'id,title,page', limit: 'all', status: 'all'}; + let postsQuery = {fields: 'id,title,page', limit: 'all'}; let content = this.content; return this.ajax.request(postsUrl, {data: postsQuery}).then((posts) => { @@ -178,7 +178,7 @@ export default Component.extend({ _loadPages() { let store = this.store; let pagesUrl = `${store.adapterFor('page').urlForQuery({}, 'page')}/`; - let pagesQuery = {fields: 'id,title,page', limit: 'all', status: 'all'}; + let pagesQuery = {fields: 'id,title,page', limit: 'all'}; let content = this.content; return this.ajax.request(pagesUrl, {data: pagesQuery}).then((pages) => { diff --git a/ghost/admin/app/routes/editor/edit.js b/ghost/admin/app/routes/editor/edit.js index b9834afa61..34985de5a9 100644 --- a/ghost/admin/app/routes/editor/edit.js +++ b/ghost/admin/app/routes/editor/edit.js @@ -24,8 +24,7 @@ export default AuthenticatedRoute.extend({ } let query = { - id: post_id, - status: 'all' + id: post_id }; return this.store.query(modelName, query)