Simplify user update call syntax
This commit is contained in:
@ -132,8 +132,7 @@ pub async fn users_route(
|
||||
let res = users
|
||||
.send(users_actor::UpdateUserRequest(user.clone()))
|
||||
.await
|
||||
.unwrap()
|
||||
.0;
|
||||
.unwrap();
|
||||
|
||||
if !res {
|
||||
danger = Some(
|
||||
|
@ -61,8 +61,7 @@ pub async fn save_totp_factor(
|
||||
let res = users
|
||||
.send(users_actor::UpdateUserRequest(user))
|
||||
.await
|
||||
.unwrap()
|
||||
.0;
|
||||
.unwrap();
|
||||
|
||||
if !res {
|
||||
HttpResponse::InternalServerError().body("Failed to update user information!")
|
||||
@ -110,8 +109,7 @@ pub async fn save_webauthn_factor(
|
||||
let res = users
|
||||
.send(users_actor::UpdateUserRequest(user))
|
||||
.await
|
||||
.unwrap()
|
||||
.0;
|
||||
.unwrap();
|
||||
|
||||
if !res {
|
||||
HttpResponse::InternalServerError().body("Failed to update user information!")
|
||||
@ -137,8 +135,7 @@ pub async fn delete_factor(
|
||||
let res = users
|
||||
.send(users_actor::UpdateUserRequest(user))
|
||||
.await
|
||||
.unwrap()
|
||||
.0;
|
||||
.unwrap();
|
||||
|
||||
if !res {
|
||||
HttpResponse::InternalServerError().body("Failed to update user information!")
|
||||
|
Reference in New Issue
Block a user