aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js
index f678224..c689779 100644
--- a/src/index.js
+++ b/src/index.js
@@ -65,7 +65,12 @@ function setUpModels(){
password: {
type: Sequelize.STRING,
allowNull: false,
- },})
+ },}),
+ "requests": database.define('requests', {
+ ip: Sequelize.STRING,
+ method: Sequelize.STRING,
+ url: Sequelize.STRING,
+ })
}
models.pictures.belongsTo(models.posts);
return models;
@@ -74,6 +79,6 @@ function setUpModels(){
const models = setUpModels();
sync();
-server.setUpRoutes(models, jwtFunctions);
+server.setUpRoutes(models, jwtFunctions, database);
server.listen(config.port);