mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge pull request #93 from Gerald1614/500_error_on_login
FIX #49 capture error in readable format with try and catch
This commit is contained in:
commit
3d3b3c8c24
@ -97,8 +97,8 @@ export const resolvers = {
|
||||
// }
|
||||
const session = driver.session()
|
||||
return session.run(
|
||||
'MATCH (user:User {email: "' + email + '"}) ' +
|
||||
'RETURN user {.id, .slug, .name, .avatar, .email, .password, .role} as user LIMIT 1')
|
||||
'MATCH (user:User {email: $userEmail}) ' +
|
||||
'RETURN user {.id, .slug, .name, .avatar, .email, .password, .role} as user LIMIT 1', { userEmail: email })
|
||||
.then(async (result) => {
|
||||
session.close()
|
||||
const [currentUser] = await result.records.map(function (record) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user