Ghost/ghost/admin/mirage/factories/label.js

16 lines
441 B
JavaScript
Raw Normal View History

import moment from 'moment-timezone';
import {Factory} from 'miragejs';
export default Factory.extend({
createdAt() { return moment().toISOString(); },
createdBy: 1,
name(i) { return `Label ${i}`; },
slug(i) { return `label-${i}`; },
updatedAt() { return moment().toISOString(); },
updatedBy: 1,
count() {
// this gets updated automatically by the label serializer
return {members: 0};
}
});