JsonApiAdapter fix to make index "load more" work

This commit is contained in:
Toby Zerner 2015-01-30 12:05:57 +10:30
parent 9885a69eba
commit 61b0dfaa81

View File

@ -3,7 +3,16 @@ import config from '../config/environment';
export default JsonApiAdapter.extend({
// Todo: make this loaded via an environment variable or something
host: config.apiURL
// Todo: make this loaded via an environment variable or something
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;
}
}
});