1
0
mirror of https://github.com/TryGhost/Ghost.git synced 2024-12-24 11:22:19 +03:00
Ghost/ghost/admin/app/models/base.js
Kevin Ansfield 9186280ac9 updated to use new model._meta
- use model._meta to access the meta object in the delete response
- removed unused `_deleteUser` method
- move the success/failure method bodies into the main `deleteUser` task to improve readability
- added a timeout after calling `_exportDb()` so that the iframe is not removed from the DOM immediately after it's `src` value is set due to a transition away from the member screen
2020-02-10 12:41:35 +00:00

13 lines
510 B
JavaScript

import Model from '@ember-data/model';
export default Model.extend({
// this is a hack that gives us access to meta data in single resource responses
// allows similar response.get('_meta') as with multi-resource responses but can
// suffer from race conditions
// TODO: review once the record links and meta RFC lands
// https://github.com/emberjs/rfcs/blob/master/text/0332-ember-data-record-links-and-meta.md
get _meta() {
return this._internalModel.type.___meta;
}
});