|
|
@ -25,7 +25,7 @@ pub async fn get_challenge(
|
|
|
|
lang: cookies
|
|
|
|
lang: cookies
|
|
|
|
.get(LANG_COOKIE)
|
|
|
|
.get(LANG_COOKIE)
|
|
|
|
.map(|cookie| vec![cookie.value().to_owned()])
|
|
|
|
.map(|cookie| vec![cookie.value().to_owned()])
|
|
|
|
.or_else(|| accept_language.0)
|
|
|
|
.or(accept_language.0)
|
|
|
|
.unwrap_or_else(|| vec![DEFAULT_LANG.to_owned()]),
|
|
|
|
.unwrap_or_else(|| vec![DEFAULT_LANG.to_owned()]),
|
|
|
|
user: User::get(cookies).await.unwrap(),
|
|
|
|
user: User::get(cookies).await.unwrap(),
|
|
|
|
content: Challenge::get(challenge),
|
|
|
|
content: Challenge::get(challenge),
|
|
|
|