mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
remove password from query.
This commit is contained in:
parent
fbdbabc382
commit
ca38892322
@ -22,7 +22,7 @@ export default (driver) => {
|
||||
const session = driver.session()
|
||||
const result = await session.run(
|
||||
'MATCH (user:User {id: $userId}) ' +
|
||||
'RETURN user {.id, .slug, .name, .avatar, .email, .password, .role} as user LIMIT 1',
|
||||
'RETURN user {.id, .slug, .name, .avatar, .email, .role} as user LIMIT 1',
|
||||
{
|
||||
userId: JWTPayload.id
|
||||
}
|
||||
@ -33,7 +33,6 @@ export default (driver) => {
|
||||
})
|
||||
|
||||
if (currentUser) {
|
||||
delete currentUser.password
|
||||
currentUser.avatar = fixUrl(currentUser.avatar)
|
||||
return next(null, currentUser)
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user