pub async fn password_reset_exists_for_email(pool: &DBPool, email: String) -> Result<bool> {
        prune_password_resets(pool).await?;

        let res = generic_service_err!(
            sqlx::query_file_as!(PasswordReset, "sql/password_reset/get_password_reset_by_email.sql", email)
            .fetch_all(pool).await,
            "Failed to check if password reset record exists for given email");

        Ok(res.len() == 1)
    }
/// Returns whether or not a password reset record exists given an email address
/// 
/// # Arguments
/// 
/// * `pool` - The database pool
/// * `email` - The email address associated with the password reset record
Returns whether or not a password reset record exists given an email address
Returns whether or not a password reset record exists given an email address
pub async fn password_reset_exists_for_email(pool: &DBPool, email: String) -> Result<bool> {
        prune_password_resets(pool).await?;
        let res = generic_service_err!(
            sqlx::query_file_as!(PasswordReset, "sql/password_reset/get_password_reset_by_email.sql", email)
            .fetch_all(pool).await,
            "Failed to check if password reset record exists for given email");
        Ok(res.len() == 1)
    }
pub async fn password_reset_exists_for_email ( pool : & DBPool , email : String ) -> Result < bool > { prune_password_resets ( pool ) . await ? ; let res = generic_service_err ! ( sqlx query_file_as ( PasswordReset " " email ) fetch_all ( pool ) await " " ) ; Ok ( res . len ( ) == 1 ) }
Returns whether or not a password reset record exists given an email address
Returns whether or not a password reset record exists given an email address
pool
&DBPool
email
String
pool
&DBPool
email
String