wip adding account pages and add seeder package
This commit is contained in:
parent
3459bf26f8
commit
ec8a7b9228
10 changed files with 150 additions and 18 deletions
33
imports/startup/server/fixtures.js
Normal file
33
imports/startup/server/fixtures.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import seeder from '@cleverbeagle/seeder';
|
||||
import { Meteor } from 'meteor/meteor';
|
||||
import Documents from '../../api/Documents/Documents';
|
||||
|
||||
seeder(Meteor.users, {
|
||||
environments: ['development', 'staging'],
|
||||
data: [{
|
||||
email: 'admin@admin.com',
|
||||
password: 'password',
|
||||
profile: {
|
||||
name: {
|
||||
first: 'George',
|
||||
last: 'Clooney',
|
||||
},
|
||||
},
|
||||
roles: ['admin'],
|
||||
}],
|
||||
});
|
||||
|
||||
seeder(Documents, {
|
||||
environments: ['development', 'staging'],
|
||||
wipe: true,
|
||||
min: 10,
|
||||
model(index, faker) {
|
||||
const owner = Meteor.users.findOne({ 'emails.address': 'admin@admin.com' })._id;
|
||||
const documentNumber = index + 1;
|
||||
return {
|
||||
owner,
|
||||
title: `${faker.lorem.words(5)} #${documentNumber}`,
|
||||
body: `This is the body of example document #${documentNumber}.`,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
@ -1 +1,2 @@
|
|||
import './api';
|
||||
import './fixtures';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue