Add the lang prefix to all links
This commit is contained in:
parent
b39cb1c067
commit
3089ede6eb
7 changed files with 40 additions and 11 deletions
|
|
@ -21,7 +21,12 @@ pub async fn create(
|
|||
) -> Result<Response> {
|
||||
if let Some(user) = user {
|
||||
let recipe_id = connection.create_recipe(user.id).await?;
|
||||
Ok(Redirect::to(&format!("/recipe/edit/{}", recipe_id)).into_response())
|
||||
Ok(Redirect::to(&format!(
|
||||
"/{}/recipe/edit/{}",
|
||||
tr.current_lang_code(),
|
||||
recipe_id
|
||||
))
|
||||
.into_response())
|
||||
} else {
|
||||
Ok(Html(MessageTemplate::new(tr.t(Sentence::NotLoggedIn), tr).render()?).into_response())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue