From 621058356de2ffbe810eb1909da705ac5be701fa Mon Sep 17 00:00:00 2001 From: philipp Date: Thu, 27 Jul 2023 14:50:44 +0200 Subject: [PATCH] proper redirects --- src/tera/log.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tera/log.rs b/src/tera/log.rs index 56c5dcb..71130e3 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -150,7 +150,7 @@ async fn home_kiosk( let logbook = Logbook::find_by_id(db, logbook_id).await; let Some(logbook) = logbook else { return Flash::error( - Redirect::to("/admin/log"), + Redirect::to("/log/kiosk"), format!("Log with ID {} does not exist!", logbook_id), ) }; @@ -165,9 +165,9 @@ async fn home_kiosk( ) .await { - Ok(_) => Flash::success(Redirect::to("/log"), "Successfully updated log"), + Ok(_) => Flash::success(Redirect::to("/log/kiosk"), "Successfully updated log"), Err(_) => Flash::error( - Redirect::to("/log"), + Redirect::to("/log/kiosk"), format!("Logbook with ID {} could not be updated!", logbook_id), ), }