mirror of
https://github.com/IT4Change/gradido.git
synced 2026-03-01 12:44:43 +00:00
change name and tpye of query sendResetPasswordEmail to mutation forgotPassword. Do not throw when email is not found
This commit is contained in:
parent
d4415ee256
commit
3078315286
@ -391,10 +391,11 @@ export class UserResolver {
|
||||
}
|
||||
|
||||
@Authorized([RIGHTS.SEND_RESET_PASSWORD_EMAIL])
|
||||
@Query(() => Boolean)
|
||||
async sendResetPasswordEmail(@Arg('email') email: string): Promise<boolean> {
|
||||
@Mutation(() => Boolean)
|
||||
async forgotPassword(@Arg('email') email: string): Promise<boolean> {
|
||||
email = email.trim().toLowerCase()
|
||||
const user = await DbUser.findOneOrFail({ email })
|
||||
const user = await DbUser.findOne({ email })
|
||||
if (!user) return true
|
||||
|
||||
// can be both types: REGISTER and RESET_PASSWORD
|
||||
let optInCode = await LoginEmailOptIn.findOne({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user