Skip to content

Commit

Permalink
Update osa4.md
Browse files Browse the repository at this point in the history
All other examples use res.json()
  • Loading branch information
villeheilala authored Nov 12, 2018
1 parent ecdbcd4 commit e8420cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osa4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit e8420cf

Please sign in to comment.