about summary refs log tree commit diff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 86376d4..c422fea 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,7 +8,7 @@ mod database;
 mod indieauth;
 mod micropub;
 
-use crate::indieauth::check_auth;
+use crate::indieauth::IndieAuthMiddleware;
 use crate::micropub::{get_handler,post_handler};
 
 #[derive(Clone)]
@@ -39,7 +39,7 @@ fn equip_app<Storage>(mut app: App<Storage>) -> App<Storage>
 where
     Storage: database::Storage + Send + Sync + Clone
 {
-    app.at("/micropub").with(check_auth).get(get_handler).post(post_handler);
+    app.at("/micropub").with(IndieAuthMiddleware::new()).get(get_handler).post(post_handler);
     // The Micropub client. It'll start small, but could grow into something full-featured!
     app.at("/micropub/client").get(|_: Request<_>| async move {
         Ok(Response::builder(200).body(MICROPUB_CLIENT).content_type("text/html").build())