ENH: Collections (update) (#40)

Fixes #36
This commit is contained in:
Matthew Ryan Dillon 2017-10-07 17:37:24 -07:00 committed by GitHub
parent e1abc5e4cb
commit f41f4caccd
17 changed files with 221 additions and 77 deletions

View file

@ -9,4 +9,11 @@ export default JSONAPIAdapter.extend(DataAdapterMixin, {
namespace: API_NAMESPACE,
host: API_HOST,
authorizer: 'authorizer:application',
// DRF-JSON-API returns 400 by default
handleResponse(status, headers, payload) {
if (status === 400 && payload.errors) {
return new DS.InvalidError(payload.errors);
}
return this._super(...arguments);
}
});