This commit is contained in:
Philippe Loctaux 2023-11-15 21:11:49 +01:00
parent b4271853a9
commit f85aa12eef
3 changed files with 4 additions and 4 deletions

View file

@ -7,7 +7,7 @@ pub mod settings;
pub mod setup;
pub mod well_known;
pub(self) mod prelude {
mod prelude {
pub use crate::database::Database;
pub use crate::error::Error;
pub use crate::file_from_bytes::FileFromBytes;

View file

@ -133,7 +133,7 @@ pub async fn admin_permissions_for_user_form(
.iter()
.map(|role| RoleID::from_str(role))
.collect::<std::result::Result<Vec<_>, _>>()
.map_err(|_| Error::bad_request(format!("Invalid role detected")))?;
.map_err(|_| Error::bad_request("Invalid role detected".to_string()))?;
let mut transaction = db.begin().await?;
@ -300,7 +300,7 @@ pub async fn admin_permissions_for_role_form(
.iter()
.map(|user| UserID::from_str(user))
.collect::<std::result::Result<Vec<_>, _>>()
.map_err(|_| Error::bad_request(format!("Invalid user detected")))?;
.map_err(|_| Error::bad_request("Invalid user detected".to_string()))?;
let mut transaction = db.begin().await?;

View file

@ -217,6 +217,6 @@ pub async fn admin_roles_info_update(
Ok(Flash::new(
Redirect::to(uri!(admin_roles_view(id))),
FlashKind::Success,
format!("Role has been updated."),
"Role has been updated.".to_string(),
))
}