diff --git a/server/src/routes/auth.ts b/server/src/routes/auth.ts index bc2d9bbb..4a6c1114 100644 --- a/server/src/routes/auth.ts +++ b/server/src/routes/auth.ts @@ -38,7 +38,7 @@ router.post('/register', async (req, res) => { } }) -const login = async (req, res) => { +router.post('/login', async (req, res) => { try { const { email, password } = req.body; if (!email || !password) return res.status(400).send('Email and password are required') @@ -63,7 +63,7 @@ const login = async (req, res) => { } catch (error) { res.status(400).send(`Could not login user - ${error.message}`) } -} +}) const logout = async (req, res) => { try {