Fix more clippy issues, implement forgot password
All checks were successful
Build Crate / build (push) Successful in 1m48s
All checks were successful
Build Crate / build (push) Successful in 1m48s
This commit is contained in:
@@ -71,11 +71,16 @@ pub async fn post_register_user(
|
||||
forgot_password_request: Set(None),
|
||||
..Default::default()
|
||||
};
|
||||
// TODO -> error handling
|
||||
let db_resp = user::Entity::insert(new_user)
|
||||
.exec(&state.db_conn)
|
||||
.await
|
||||
.unwrap();
|
||||
let db_resp = user::Entity::insert(new_user).exec(&state.db_conn).await;
|
||||
match db_resp {
|
||||
Ok(_) => {}
|
||||
Err(err) => {
|
||||
return (
|
||||
StatusCode::INTERNAL_SERVER_ERROR,
|
||||
Json(GenericResponse::err(err.to_string().as_str())),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return (StatusCode::OK, Json(GenericResponse::ok()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user