refactor: Use Redirect::to instead of Redirect::temporary for all redirects.
This commit is contained in:
@@ -89,7 +89,7 @@ pub async fn add_user(
|
||||
.await
|
||||
.context("Failed to insert new user into database")?;
|
||||
|
||||
Ok(Redirect::temporary("/__dungeon").into_response())
|
||||
Ok(Redirect::to("/__dungeon").into_response())
|
||||
}
|
||||
|
||||
pub async fn delete_user(
|
||||
@@ -111,7 +111,7 @@ pub async fn delete_user(
|
||||
.await
|
||||
.context(format!("Failed to delete user with id {}", id))?;
|
||||
|
||||
Ok(Redirect::temporary("/__dungeon").into_response())
|
||||
Ok(Redirect::to("/__dungeon").into_response())
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
@@ -138,5 +138,5 @@ pub async fn change_password(
|
||||
.await
|
||||
.context(format!("Failed to update password for user with id {}", id))?;
|
||||
|
||||
Ok(Redirect::temporary("/__dungeon").into_response())
|
||||
Ok(Redirect::to("/__dungeon").into_response())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user