Skip to content

Commit

Permalink
fix(user): corrected typo
Browse files Browse the repository at this point in the history
  • Loading branch information
HoseaCodes committed Mar 16, 2022
1 parent 6902db3 commit 05486cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions controllers/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ async function login(req, res) {
const { email, password } = req.body

const user = await Users.findOne({ email })
if (!user) return res.status(400).json({ msh: "User does not exist." })
if (!user) return res.status(400).json({ msg: "User does not exist." })

const isMatch = await bcrypt.compare(password, user.password)
if (!isMatch) return res.status(400).json({ msh: "Invalid password" })
if (!isMatch) return res.status(400).json({ msg: "Invalid password" })

const accesstoken = createAccessToken({ id: user._id })
const refreshtoken = createRefreshToken({ id: user._id })
Expand Down

0 comments on commit 05486cb

Please sign in to comment.