Avoid to use an hash map in translations
This commit is contained in:
parent
03ebbb74fa
commit
91ab379718
10 changed files with 334 additions and 237 deletions
|
|
@ -249,7 +249,7 @@ pub async fn set_language(
|
|||
Extension(user): Extension<Option<model::User>>,
|
||||
ExtractRon(ron): ExtractRon<common::ron_api::SetRecipeLanguage>,
|
||||
) -> Result<StatusCode> {
|
||||
if !crate::translation::Tr::available_codes()
|
||||
if !crate::translation::available_codes()
|
||||
.iter()
|
||||
.any(|&l| l == ron.lang)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue