diff options
author | Mark Powers <markppowers0@gmail.com> | 2019-02-04 17:27:00 -0500 |
---|---|---|
committer | Mark Powers <markppowers0@gmail.com> | 2019-02-04 17:27:00 -0500 |
commit | f4b2eabe2da89abc33e4cbe21ca1560995b32eca (patch) | |
tree | d66bf7178aadf040aff19f2e57f5300780157458 /src/index.js | |
parent | cf0a680fd9dc07ac7b2d95d1cd2bbca5431d4ab6 (diff) |
Add log viewer in admin panel
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 9 |
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); |