-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitialDatabase.js
More file actions
executable file
·20 lines (18 loc) · 947 Bytes
/
initialDatabase.js
File metadata and controls
executable file
·20 lines (18 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// called when API server is first started
async function initial(Role, Course, Quiz) {
await Role.create({ id: 1, name: 'user' });
await Role.create({ id: 2, name: 'admin' });
await Course.create({ id: 1, name: 'Heart Fundamentals' });
await Course.create({ id: 2, name: 'ECG Introduction' });
await Course.create({ id: 3, name: 'Parts Of The ECG Explained' });
await Course.create({ id: 4, name: 'How To Read An ECG' });
await Course.create({ id: 5, name: 'How To Document An ECG' });
await Course.create({ id: 6, name: 'Conditions' });
await Quiz.create({ id: 1, name: 'Heart Fundamentals' });
await Quiz.create({ id: 2, name: 'ECG Introduction' });
await Quiz.create({ id: 3, name: 'Parts Of The ECG Explained' });
await Quiz.create({ id: 4, name: 'How To Read An ECG' });
await Quiz.create({ id: 5, name: 'How To Document An ECG' });
await Quiz.create({ id: 6, name: 'Conditions' });
}
module.exports = initial;