From f4b2eabe2da89abc33e4cbe21ca1560995b32eca Mon Sep 17 00:00:00 2001 From: Mark Powers Date: Mon, 4 Feb 2019 17:27:00 -0500 Subject: Add log viewer in admin panel --- src/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/index.js') 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); -- cgit v1.2.3