Ghost/ghost/admin/mirage/factories/api-key.js
Kevin Ansfield c4c48d4104 Resolved ember-cli-mirage import deprecations
refs https://github.com/TryGhost/Admin/pull/2209

- `miragejs` has been extracted to a framework-independent library, the re-exports of `miragejs` elements in `ember-cli-mirage` have been deprecated making our test logs very noisy
- added `miragejs` as a top-level dependency
- updated all relevant imports to pull from `miragejs` instead of `ember-cli-mirage`
2022-03-08 11:32:01 +00:00

21 lines
498 B
JavaScript

import moment from 'moment';
import {Factory} from 'miragejs';
export default Factory.extend({
type: 'content',
secret() {
if (this.integration) {
return `${this.integration.slug}_${this.type}_key-12345`;
}
return `${this.type}_key-12345`;
},
lastSeenAt() {
return moment.utc().format();
},
createdAt() { return moment.utc().format(); },
createdBy: 1,
updatedAt() { return moment.utc().format(); },
updatedBy: 1
});