From 2d2d519af5efb818b84e17716915567daa00a85e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Tue, 29 Aug 2023 21:34:01 +0200 Subject: [PATCH] clip --- rust/src/routing/routes.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/src/routing/routes.rs b/rust/src/routing/routes.rs index ce5149c..4d4829f 100644 --- a/rust/src/routing/routes.rs +++ b/rust/src/routing/routes.rs @@ -434,12 +434,12 @@ pub async fn trip_comment_set( ) .await?; - if !found { + if found { + Ok(Redirect::to(&format!("/trips/{trip_id}/"))) + } else { Err(Error::Request(RequestError::NotFound { message: format!("trip with id {trip_id} not found"), })) - } else { - Ok(Redirect::to(&format!("/trips/{trip_id}/"))) } }