about summary refs log tree commit diff
path: root/kittybox-rs/src/frontend
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2023-07-09 22:22:34 +0300
committerVika <vika@fireburn.ru>2023-07-17 01:53:42 +0300
commit99ff9cdc6890959cd4d2112c2e37b97ae83cb43c (patch)
tree31cdaf82de9d95ad4ee857f9148ad442f67db23d /kittybox-rs/src/frontend
parentdc7dfc61ec839175ebb51fcbaef1156fea5fdcf4 (diff)
downloadkittybox-99ff9cdc6890959cd4d2112c2e37b97ae83cb43c.tar.zst
cargo update, part 2: Axum
Axum got some breaking changes and gained some nice features —
however, features come later, breaking changes come first.

Perhaps it would be nice to actually construct a State with all of my
stuff, and then make functions generic over that. Could reduce the
amount of generic stuff I am producing... maybe.
Diffstat (limited to 'kittybox-rs/src/frontend')
-rw-r--r--kittybox-rs/src/frontend/onboarding.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/kittybox-rs/src/frontend/onboarding.rs b/kittybox-rs/src/frontend/onboarding.rs
index 4b62d87..d5cde02 100644
--- a/kittybox-rs/src/frontend/onboarding.rs
+++ b/kittybox-rs/src/frontend/onboarding.rs
@@ -129,8 +129,8 @@ async fn onboard<D: Storage + 'static>(
 pub async fn post<D: Storage + 'static>(
     Extension(db): Extension<D>,
     Host(host): Host,
-    Json(data): Json<OnboardingData>,
     Extension(http): Extension<reqwest::Client>,
+    Json(data): Json<OnboardingData>,
 ) -> axum::response::Response {
     let user_uid = format!("https://{}/", host.as_str());
 
@@ -166,6 +166,6 @@ pub async fn post<D: Storage + 'static>(
 pub fn router<S: Storage + 'static>(database: S, http: reqwest::Client) -> axum::routing::MethodRouter {
     axum::routing::get(get)
         .post(post::<S>)
-        .layer(axum::Extension(database))
+        .layer::<_, _, std::convert::Infallible>(axum::Extension(database))
         .layer(axum::Extension(http))
 }