diff --git a/osa4.md b/osa4.md index 8ec3b4c..a9901de 100644 --- a/osa4.md +++ b/osa4.md @@ -2254,7 +2254,7 @@ loginRouter.post('/', async (request, response) => { await bcrypt.compare(body.password, user.passwordHash) if ( !(user && passwordCorrect) ) { - return response.status(401).send({ error: 'invalid username or password' }) + return response.status(401).json({ error: 'invalid username or password' }) } const userForToken = {