about summary refs log tree commit diff
path: root/src/micropub/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/micropub/mod.rs')
-rw-r--r--src/micropub/mod.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/micropub/mod.rs b/src/micropub/mod.rs
index 84b9083..23f20c4 100644
--- a/src/micropub/mod.rs
+++ b/src/micropub/mod.rs
@@ -7,17 +7,21 @@ pub use post::post_handler;
 
 pub struct CORSMiddleware {}
 
-use async_trait::async_trait;
-use tide::{Next, Request, Result};
 use crate::database;
 use crate::ApplicationState;
+use async_trait::async_trait;
+use tide::{Next, Request, Result};
 
 #[async_trait]
 impl<B> tide::Middleware<ApplicationState<B>> for CORSMiddleware
 where
     B: database::Storage + Send + Sync + Clone,
 {
-    async fn handle(&self, req: Request<ApplicationState<B>>, next: Next<'_, ApplicationState<B>>) -> Result {
+    async fn handle(
+        &self,
+        req: Request<ApplicationState<B>>,
+        next: Next<'_, ApplicationState<B>>,
+    ) -> Result {
         let mut res = next.run(req).await;
 
         res.insert_header("Access-Control-Allow-Origin", "*");