This commit is contained in:
2023-08-29 21:34:01 +02:00
parent ce17b74cbf
commit 2d2d519af5

View File

@@ -434,12 +434,12 @@ pub async fn trip_comment_set(
) )
.await?; .await?;
if !found { if found {
Ok(Redirect::to(&format!("/trips/{trip_id}/")))
} else {
Err(Error::Request(RequestError::NotFound { Err(Error::Request(RequestError::NotFound {
message: format!("trip with id {trip_id} not found"), message: format!("trip with id {trip_id} not found"),
})) }))
} else {
Ok(Redirect::to(&format!("/trips/{trip_id}/")))
} }
} }