diff options
author | Vika <vika@fireburn.ru> | 2025-01-01 23:17:56 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2025-01-01 23:17:56 +0300 |
commit | d10710326da703f69eaa06723dc66e330fd32745 (patch) | |
tree | e4a32c2a7f2e4a61d1f3f6237977de64e47470ae /src/frontend | |
parent | 675141379067858376698d5f75ab163977d33e3a (diff) | |
download | kittybox-d10710326da703f69eaa06723dc66e330fd32745.tar.zst |
axum: 0.7.9 → 0.8.1
Some breaking changes. For better or for worse. The optional extractor breaking change is a double-edged sword, since not all extractors can be used with `Option<T>` now, and you have to use `Result<T, T::Rejection>` even when you want to ignore an error coming from an extractor, such as `Query`. However, this allows catching errors on authorization extractors even in places where authorization is optional. Change-Id: I35f809d3adf27dbef0e7ee93dc1a7af178b7d014
Diffstat (limited to 'src/frontend')
-rw-r--r-- | src/frontend/mod.rs | 4 | ||||
-rw-r--r-- | src/frontend/onboarding.rs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/frontend/mod.rs b/src/frontend/mod.rs index 9abbcf1..8338ac6 100644 --- a/src/frontend/mod.rs +++ b/src/frontend/mod.rs @@ -1,10 +1,10 @@ use crate::database::{Storage, StorageError}; use axum::{ - extract::{Host, Query, State}, + extract::{Query, State}, http::{StatusCode, Uri}, response::IntoResponse, }; -use axum_extra::headers::HeaderMapExt; +use axum_extra::{extract::Host, headers::HeaderMapExt}; use futures_util::FutureExt; use serde::Deserialize; use std::convert::TryInto; diff --git a/src/frontend/onboarding.rs b/src/frontend/onboarding.rs index a8d2ae6..4588157 100644 --- a/src/frontend/onboarding.rs +++ b/src/frontend/onboarding.rs @@ -2,11 +2,12 @@ use std::sync::Arc; use crate::database::{settings, Storage}; use axum::{ - extract::{FromRef, Host, State}, + extract::{FromRef, State}, http::StatusCode, response::{Html, IntoResponse}, Json, }; +use axum_extra::extract::Host; use kittybox_frontend_renderer::{ErrorPage, OnboardingPage, Template}; use serde::Deserialize; use tokio::{task::JoinSet, sync::Mutex}; |