mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
refactor: userController and add req user type
This commit is contained in:
1 parent
4c421b4cb3
commit
c912319967
8 files changed
+49
-23
No files matched your search
@@ -29,7 +29,11 @@ async function verifyPassword(
|
||||
if (!isPasswordValid) {
|
||||
return done(null, false, { message: 'Incorrect username or password.' })
|
||||
}
|
||||
return done(null, user)
|
||||
return done(null, {
|
||||
id: user.id,
|
||||
username: user.username,
|
||||
email: user.email,
|
||||
})
|
||||
} catch (err) {
|
||||
return done(err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user