Removed redundant 'status=all' in user queries

closes https://github.com/TryGhost/Ghost/issues/5947

- Removed status=all parameter assignment as they are handled on the server side using enforcedFilters/defaultFilters (4acc375fb6/core/server/models/user.js (L293))
This commit is contained in:
Nazar Gargol 2019-01-28 13:37:34 +00:00 committed by Naz Gargol
parent c4a8a1cbaa
commit 4fcac6d701

View File

@ -2,25 +2,6 @@ import ApplicationAdapter from 'ghost-admin/adapters/application';
import SlugUrl from 'ghost-admin/mixins/slug-url';
export default ApplicationAdapter.extend(SlugUrl, {
find(store, type, id) {
return this.findQuery(store, type, {id, status: 'all'});
},
// TODO: This is needed because the API currently expects you to know the
// status of the record before retrieving by ID. Quick fix is to always
// include status=all in the query
findRecord(store, type, id, snapshot) {
let url = this.buildIncludeURL(store, type.modelName, id, snapshot, 'findRecord');
url += '&status=all';
return this.ajax(url, 'GET');
},
findAll(store, type, id) {
return this.query(store, type, {id, status: 'all'});
},
queryRecord(store, type, query) {
if (!query || query.id !== 'me') {
return this._super(...arguments);