diff --git a/addons/api/addon/adapters/application.js b/addons/api/addon/adapters/application.js index 18e1c3c67..fe9c69977 100644 --- a/addons/api/addon/adapters/application.js +++ b/addons/api/addon/adapters/application.js @@ -106,16 +106,6 @@ export default class ApplicationAdapter extends RESTAdapter.extend( return dasherize(pluralize(type)); } - /** - * Intercepts "empty" responses and adds an empty `items` array. - * @override - * @method findAll - * @return {Promise} promise - */ - findAll() { - return super.findAll(...arguments).then(prenormalizeArrayResponse); - } - /** * Intercepts "empty" responses and adds an empty `items` array. * This query method now supports pagination by checking the responseType and diff --git a/addons/api/tests/dummy/app/routes/application.js b/addons/api/tests/dummy/app/routes/application.js index 19cf9e7fb..06c87fe6a 100644 --- a/addons/api/tests/dummy/app/routes/application.js +++ b/addons/api/tests/dummy/app/routes/application.js @@ -12,6 +12,6 @@ export default class ApplicationRoute extends Route { @service store; model() { - this.store.findAll('scope'); + this.store.query('scope', {}); } } diff --git a/addons/api/tests/unit/adapters/application-test.js b/addons/api/tests/unit/adapters/application-test.js index 2f309f5a1..354084efc 100644 --- a/addons/api/tests/unit/adapters/application-test.js +++ b/addons/api/tests/unit/adapters/application-test.js @@ -144,12 +144,7 @@ module('Unit | Adapter | application', function (hooks) { const adapter = this.owner.lookup('adapter:application'); const store = this.owner.lookup('service:store'); this.server.get('/v1/users', () => new Response({})); - const prenormalized = await adapter.findAll( - store, - { modelName: 'user' }, - null, - [], - ); + const prenormalized = await adapter.query(store, { modelName: 'user' }, {}); assert.deepEqual(prenormalized, { items: [] }); }); diff --git a/addons/api/tests/unit/models/scope-test.js b/addons/api/tests/unit/models/scope-test.js index b264156b6..603a25852 100644 --- a/addons/api/tests/unit/models/scope-test.js +++ b/addons/api/tests/unit/models/scope-test.js @@ -23,7 +23,7 @@ module('Unit | Model | scope', function (hooks) { { id: 'p_3', type: 'project', scope: { scope_id: 'o_2' } }, ], })); - const scopes = await store.findAll('scope'); + const scopes = await store.query('scope', {}); // check integrity of scope relationships assert.notOk(await scopes[0].get('scope'), 'Global scope has no parent'); assert.strictEqual( diff --git a/ui/admin/app/routes/scopes.js b/ui/admin/app/routes/scopes.js index 3368d4aca..589106584 100644 --- a/ui/admin/app/routes/scopes.js +++ b/ui/admin/app/routes/scopes.js @@ -35,7 +35,7 @@ export default class ScopesRoute extends Route { }); // NOTE: In the absence of a `scope_id` query parameter, this endpoint is // expected to default to the global scope, thus returning org scopes. - return this.store.findAll('scope').catch(() => A([])); + return this.store.query('scope', {}).catch(() => A([])); } /** diff --git a/ui/desktop/app/routes/scopes.js b/ui/desktop/app/routes/scopes.js index ce75f17f8..5e41c3579 100644 --- a/ui/desktop/app/routes/scopes.js +++ b/ui/desktop/app/routes/scopes.js @@ -26,6 +26,6 @@ export default class ScopesRoute extends Route { model() { // NOTE: In the absence of a `scope_id` query parameter, this endpoint is // expected to default to the global scope, thus returning org scopes. - return this.store.findAll('scope').catch(() => A([])); + return this.store.query('scope', {}).catch(() => A([])); } }