1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Move extractMeta override to serializer

This commit is contained in:
Toby Zerner
2015-02-09 20:14:18 +10:30
parent 071e403020
commit eec50f687c
2 changed files with 18 additions and 18 deletions

View File

@@ -5,15 +5,6 @@ import config from '../config/environment';
export default JsonApiAdapter.extend({
host: config.apiURL,
// We can get rid of this after
// https://github.com/kurko/ember-json-api/pull/59 is merged.
extractMeta: function(store, type, payload) {
if (payload && payload.meta) {
store.metaForType(type, payload.meta);
delete payload.meta;
}
},
ajaxError: function(jqXHR) {
var errors = this._super(jqXHR);
if (errors instanceof DS.InvalidError) {
@@ -30,4 +21,4 @@ export default JsonApiAdapter.extend({
return errors;
}
});
});