fix ci; clean code
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user