From 4fcac6d701e70813bfbdbb599baee92e9292cf93 Mon Sep 17 00:00:00 2001 From: Nazar Gargol Date: Mon, 28 Jan 2019 13:37:34 +0000 Subject: [PATCH] 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 (https://github.com/TryGhost/Ghost/blob/4acc375fb600bf9b46041e26e3d06b71a5b141b1/core/server/models/user.js#L293) --- ghost/admin/app/adapters/user.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/ghost/admin/app/adapters/user.js b/ghost/admin/app/adapters/user.js index 5d9eb382c8..cdc5102d3e 100644 --- a/ghost/admin/app/adapters/user.js +++ b/ghost/admin/app/adapters/user.js @@ -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);