change(api): reset password error message
This commit is contained in:
parent
f6cd20712d
commit
febe784322
1 changed files with 1 additions and 1 deletions
|
|
@ -14,7 +14,7 @@ def reset(data: schemas.ForgetPasswordPayloadSchema, background_tasks: Backgroun
|
|||
if helper.allow_captcha() and not captcha.is_valid(data.g_recaptcha_response):
|
||||
return {"errors": ["Invalid captcha."]}
|
||||
if not smtp.has_smtp():
|
||||
return {"errors": ["no SMTP configuration found, you can ask your admin to reset your password"]}
|
||||
return {"errors": ["Email delivery failed due to invalid SMTP configuration. Please contact your admin."]}
|
||||
a_user = users.get_by_email_only(data.email)
|
||||
if a_user:
|
||||
invitation_link = users.generate_new_invitation(user_id=a_user["userId"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue