Add sessions endpoints with queries
This commit is contained in:
19
data/seeds/01-addUsers.js.bak
Normal file
19
data/seeds/01-addUsers.js.bak
Normal file
@@ -0,0 +1,19 @@
|
||||
exports.seed = function(knex) {
|
||||
return knex('users').truncate()
|
||||
.then(function () {
|
||||
return knex('users').insert([
|
||||
// {
|
||||
// id: 1,
|
||||
// email: 'gabe@ls.com',
|
||||
// username: 'gabe',
|
||||
// password: '1234'
|
||||
// },
|
||||
// {
|
||||
// id: 2,
|
||||
// email: 'gabe2@ls.com',
|
||||
// username: 'gabe2',
|
||||
// password: '1234'
|
||||
// }
|
||||
]);
|
||||
});
|
||||
};
|
||||
25
data/seeds/02-addSessions.js
Normal file
25
data/seeds/02-addSessions.js
Normal file
@@ -0,0 +1,25 @@
|
||||
exports.seed = function(knex) {
|
||||
return knex('sessions').truncate()
|
||||
.then(function () {
|
||||
return knex('sessions').insert([
|
||||
{
|
||||
"id": 1,
|
||||
"user_id": 1,
|
||||
"bed_time": "",
|
||||
"wake_time": "",
|
||||
"wake_mood": 3,
|
||||
"day_mood": 3,
|
||||
"bed_tiredness": 3
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"user_id": 1,
|
||||
"bed_time": "",
|
||||
"wake_time": "",
|
||||
"wake_mood": 4,
|
||||
"day_mood": 4,
|
||||
"bed_tiredness": 4
|
||||
}
|
||||
]);
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user