fix ci; clean code

This commit is contained in:
2023-08-05 16:29:58 +02:00
parent 94a9d285be
commit f0c6bdac14
2 changed files with 2 additions and 7 deletions

View File

@ -206,12 +206,7 @@ async fn home(
}
#[get("/<logbook_id>/delete")]
async fn delete(
db: &State<SqlitePool>,
flash: Option<FlashMessage<'_>>,
logbook_id: i32,
_adminuser: AdminUser,
) -> Flash<Redirect> {
async fn delete(db: &State<SqlitePool>, logbook_id: i32, _adminuser: AdminUser) -> Flash<Redirect> {
let logbook = Logbook::find_by_id(db, logbook_id).await;
if let Some(logbook) = logbook {
logbook.delete(db).await;