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)
This commit is contained in:
Naz Gargol 2019-09-18 16:11:35 +02:00 committed by Kevin Ansfield
parent 7e54f4802b
commit 3c2185a3bf
2 changed files with 3 additions and 4 deletions

View File

@ -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) => {

View File

@ -24,8 +24,7 @@ export default AuthenticatedRoute.extend({
}
let query = {
id: post_id,
status: 'all'
id: post_id
};
return this.store.query(modelName, query)