Function backend::routes::user::user_reset_email[][src]

pub async fn user_reset_email(
    db: Connection<PgDb>,
    kvdb: Connection<RedisDb>,
    email_info: Json<UserEmail>,
    producer: Connection<PulsarMq>
) -> (Status, Result<String, Json<ErrorResponse>>)
Expand description

User Reset Email

Send verification email for password-reset, allow 3 requests each 4 hours.

Parameters

  • Connection<PgDb>: Postgres connection
  • Connection<RedisDb>: Redis connection
  • Json<UserEmail>: Json of user email
  • Connection<PulsarMq>: Pulsar connection

Returns

  • Status: HTTP status
  • String: String “Success”

Errors

  • ErrorResponse: Error message
    • ErrorCode::EmailInvalid
    • ErrorCode::EmailDuplicate
    • ErrorCode::RateLimit
    • ErrorCode::DatabaseErr