Updates to routes

This commit is contained in:
Lucas Patenaude
2024-04-10 23:40:54 -06:00
parent f68c5b0c24
commit 508c0ac708
2 changed files with 2 additions and 2 deletions

View File

@@ -173,7 +173,7 @@ app.post('/register', async (req, res) => {
await db.none('INSERT INTO users (username, password) VALUES ($1, $2)', [req.body.username, hash]);
// Redirect user to the login page after successful registration
res.redirect('/login');
res.redirect('/home');
} catch (error) {
// If an error occurs during registration, respond with status 500 and an error message
res.status(500).json({ status: 'error', message: 'An error occurred during registration' });