pub fn forgot_password(
    db: &Database,
    item: &ForgotInput,
    mailer: &Mailer
) -> Result<(), (i32, &'static str)>
Expand description

/forgot sends an email to the email in the [‘ForgotInput’] Json in the request body that will allow the user associated with that email to change their password

sends an email, using mailer, to the email address in item that contains a unique link that allows the recipient to reset the password of the account associated with that email address (or create a new account if there is no accound accosiated with the email address)

Returns Result

  • Ok(())
  • Err([StatusCode], [Message])