mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix a TODO by @alina-beck
This commit is contained in:
parent
76841d27f1
commit
5848e6af18
@ -60,7 +60,6 @@ const sendPasswordResetMail = async (resolve, root, args, context, resolveInfo)
|
||||
|
||||
const sendEmailVerificationMail = async (resolve, root, args, context, resolveInfo) => {
|
||||
const response = await resolve(root, args, context, resolveInfo)
|
||||
// TODO: return name in response
|
||||
const { email, nonce, name } = response
|
||||
await sendMail(emailVerificationTemplate({ email, nonce, name }))
|
||||
delete response.nonce
|
||||
|
||||
@ -29,11 +29,14 @@ export default {
|
||||
MATCH (user:User {id: $userId})
|
||||
MERGE (user)<-[:BELONGS_TO]-(email:EmailAddressRequest {email: $email, nonce: $nonce})
|
||||
SET email.createdAt = toString(datetime())
|
||||
RETURN email
|
||||
RETURN email, user
|
||||
`,
|
||||
{ userId, email, nonce },
|
||||
)
|
||||
return result.records.map(record => record.get('email').properties)
|
||||
return result.records.map(record => ({
|
||||
name: record.get('user').properties.name,
|
||||
...record.get('email').properties,
|
||||
}))
|
||||
})
|
||||
try {
|
||||
const txResult = await writeTxResultPromise
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user