-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- implement controller to fetch one center - implement controller to fetch events for a particular center - write tests for fetch one center and its events
- Loading branch information
Showing
7 changed files
with
131 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
up: (queryInterface, Sequelize) => { | ||
/* | ||
Add altering commands here. | ||
Return a promise to correctly handle asynchronicity. | ||
Example: | ||
return queryInterface.bulkInsert('Person', [{ | ||
name: 'John Doe', | ||
isBetaMember: false | ||
}], {}); | ||
*/ | ||
return queryInterface.bulkInsert('Events', [ | ||
{ | ||
name: 'Biker sports event', | ||
duration: 2, | ||
date: '2018-03-05 12:01:18.936+01', | ||
organizer: 1, | ||
venue: 1, | ||
createdAt: '2018-03-05 12:01:18.936+01', | ||
updatedAt: '2018-03-05 12:01:18.936+01' | ||
}, | ||
{ | ||
name: 'NBA Playoffs', | ||
duration: 2, | ||
date: '2018-03-05 12:01:18.936+01', | ||
organizer: 1, | ||
venue: 1, | ||
createdAt: '2018-03-05 12:01:18.936+01', | ||
updatedAt: '2018-03-05 12:01:18.936+01' | ||
}, | ||
{ | ||
name: 'Paralympics', | ||
duration: 2, | ||
date: '2018-03-05 12:01:18.936+01', | ||
organizer: 1, | ||
venue: 1, | ||
createdAt: '2018-03-05 12:01:18.936+01', | ||
updatedAt: '2018-03-05 12:01:18.936+01' | ||
} | ||
]); | ||
}, | ||
|
||
down: (queryInterface, Sequelize) => { | ||
/* | ||
Add reverting commands here. | ||
Return a promise to correctly handle asynchronicity. | ||
Example: | ||
return queryInterface.bulkDelete('Person', null, {}); | ||
*/ | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters