clear email hash when email is unlinked

This commit is contained in:
keyan 2024-06-13 12:14:08 -05:00
parent 8a19fc0905
commit b1f850ee0e
1 changed files with 1 additions and 1 deletions

View File

@ -720,7 +720,7 @@ export default {
} else if (authType === 'nostr') {
user = await models.user.update({ where: { id: me.id }, data: { hideNostr: true, nostrAuthPubkey: null } })
} else if (authType === 'email') {
user = await models.user.update({ where: { id: me.id }, data: { email: null, emailVerified: null } })
user = await models.user.update({ where: { id: me.id }, data: { email: null, emailVerified: null, emailHash: null } })
} else {
throw new GraphQLError('no such account', { extensions: { code: 'BAD_INPUT' } })
}