This commit is contained in:
Mr Swift
2024-08-26 21:16:52 +03:30
parent 01a2871103
commit b120ae1708
5 changed files with 21 additions and 11 deletions
+2 -2
View File
@@ -1575,9 +1575,9 @@ module.exports.getUser = [
const user = await User.findById(decoded?._id).select(
'-token -appToken -emailConfirmationKey -mobileConfirmationKey -password -resetPassToken'
)
return res.json({ user })
return res.status(200).json({ user })
} catch (err) {
console.log('🚀 ~ file: userController.js ~ line 1070 ~ err', err)
console.log('🚀 ~ file: userController.js ~ line 1580 ~ err', err)
return res.status(401).json({ message: 'unauthenticated' })
}
}