diff --git a/controllers/loginController.js b/controllers/loginController.js index 0ef09e331296f71a84ad0793331683ccf104e51f..a3694034b119ecdbddabcc00d7c854f88b901b2e 100644 --- a/controllers/loginController.js +++ b/controllers/loginController.js @@ -1,5 +1,5 @@ const bcrypt = require('bcrypt'); -const pool = require('../db'); +const pool = require('../project'); module.exports = { showLoginPage: (req, res) => { diff --git a/controllers/registerController.js b/controllers/registerController.js index f2b683592f2579796230b4feab68d58a31d6d99f..17b18dda4e67a47c362b48cd7939dfb9f10dbefc 100644 --- a/controllers/registerController.js +++ b/controllers/registerController.js @@ -1,5 +1,5 @@ const bcrypt = require('bcrypt'); -const pool = require('../db'); +const pool = require('../project'); module.exports = { showRegisterPage: (req, res) => { @@ -20,5 +20,7 @@ module.exports = { console.error('Error inserting user:', err); res.status(500).send('Error occurred'); } + res.redirect('/'); } + };