From 99ff9cdc6890959cd4d2112c2e37b97ae83cb43c Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 9 Jul 2023 22:22:34 +0300 Subject: cargo update, part 2: Axum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- kittybox-rs/src/frontend/onboarding.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kittybox-rs/src/frontend/onboarding.rs') 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( pub async fn post( Extension(db): Extension, Host(host): Host, - Json(data): Json, Extension(http): Extension, + Json(data): Json, ) -> axum::response::Response { let user_uid = format!("https://{}/", host.as_str()); @@ -166,6 +166,6 @@ pub async fn post( pub fn router(database: S, http: reqwest::Client) -> axum::routing::MethodRouter { axum::routing::get(get) .post(post::) - .layer(axum::Extension(database)) + .layer::<_, _, std::convert::Infallible>(axum::Extension(database)) .layer(axum::Extension(http)) } -- cgit 1.4.1