Add sessions endpoints with queries

This commit is contained in:
2019-08-01 16:25:44 +02:00
parent ccc7a0bfb0
commit 03a9c793d8
12 changed files with 167 additions and 36 deletions

View 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'
// }
]);
});
};

View 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
}
]);
});
};