From c01b8b8c90fa762f25bf52437611643e3ca16e5a Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Sat, 28 Jan 2023 02:51:34 -0500 Subject: fix rerendering logout button, console page --- src/api/users.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/api/users.rs') diff --git a/src/api/users.rs b/src/api/users.rs index 45ed195..7bea200 100644 --- a/src/api/users.rs +++ b/src/api/users.rs @@ -17,7 +17,7 @@ async fn load_batch(AuthorizedUser(_user): AuthorizedUser, Json(body): Json) -> Response { let Ok(users) = User::from_user_page(body.page) else { - return ResponseCode::InternalServerError.msg("Failed to fetch users") + return ResponseCode::InternalServerError.text("Failed to fetch users") }; let Ok(json) = serde_json::to_string(&users) else { - return ResponseCode::InternalServerError.msg("Failed to fetch users") + return ResponseCode::InternalServerError.text("Failed to fetch users") }; ResponseCode::Success.json(&json) @@ -50,7 +50,7 @@ async fn load_page(AuthorizedUser(_user): AuthorizedUser, Json(body): Json Response { let Ok(json) = serde_json::to_string(&user) else { - return ResponseCode::InternalServerError.msg("Failed to fetch user") + return ResponseCode::InternalServerError.text("Failed to fetch user") }; ResponseCode::Success.json(&json) -- cgit v1.2.3-freya