Implement login form error, more clippy fixes
All checks were successful
Build Crate / build (push) Successful in 1m47s
All checks were successful
Build Crate / build (push) Successful in 1m47s
This commit is contained in:
@@ -25,13 +25,11 @@ pub async fn post_forgot_password(
|
||||
user.forgot_password_request = Set(Some(password_request.contact_info));
|
||||
let user = user.update(&state.db_conn).await;
|
||||
match user {
|
||||
Ok(_) => return (StatusCode::OK, Json(GenericResponse::ok())),
|
||||
Err(_) => {
|
||||
return (
|
||||
StatusCode::BAD_REQUEST,
|
||||
Json(GenericResponse::err("Database error")),
|
||||
)
|
||||
}
|
||||
Ok(_) => (StatusCode::OK, Json(GenericResponse::ok())),
|
||||
Err(_) => (
|
||||
StatusCode::BAD_REQUEST,
|
||||
Json(GenericResponse::err("Database error")),
|
||||
),
|
||||
}
|
||||
}
|
||||
None => (
|
||||
|
||||
Reference in New Issue
Block a user