about summary refs log tree commit diff
path: root/kittybox-rs/src/micropub
diff options
context:
space:
mode:
Diffstat (limited to 'kittybox-rs/src/micropub')
-rw-r--r--kittybox-rs/src/micropub/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/kittybox-rs/src/micropub/mod.rs b/kittybox-rs/src/micropub/mod.rs
index 9351603..04bf0a5 100644
--- a/kittybox-rs/src/micropub/mod.rs
+++ b/kittybox-rs/src/micropub/mod.rs
@@ -497,9 +497,9 @@ async fn dispatch_body(
 pub(crate) async fn post<D: Storage + 'static, A: AuthBackend>(
     Extension(db): Extension<D>,
     Extension(http): Extension<reqwest::Client>,
+    TypedHeader(content_type): TypedHeader<ContentType>,
     user: User<A>,
     body: BodyStream,
-    TypedHeader(content_type): TypedHeader<ContentType>,
 ) -> axum::response::Response {
     match dispatch_body(body, content_type).await {
         Ok(PostBody::Action(action)) => match post_action(action, db, user).await {
@@ -639,15 +639,15 @@ where
 {
     axum::routing::get(query::<S, A>)
         .post(post::<S, A>)
-        .layer(tower_http::cors::CorsLayer::new()
+        .layer::<_, _, std::convert::Infallible>(tower_http::cors::CorsLayer::new()
                .allow_methods([
                    axum::http::Method::GET,
                    axum::http::Method::POST,
                ])
                .allow_origin(tower_http::cors::Any))
-        .layer(axum::Extension(storage))
-        .layer(axum::Extension(http))
-        .layer(axum::Extension(auth))
+        .layer::<_, _, std::convert::Infallible>(axum::Extension(storage))
+        .layer::<_, _, std::convert::Infallible>(axum::Extension(http))
+        .layer::<_, _, std::convert::Infallible>(axum::Extension(auth))
 }
 
 #[cfg(test)]