From dd9d3ff3e9505926e72df7df679cefe960be23bd Mon Sep 17 00:00:00 2001 From: Vika Date: Wed, 5 May 2021 18:16:08 +0300 Subject: Moved the client to /micropub/client --- src/lib.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib.rs b/src/lib.rs index d834aed..86376d4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,7 @@ where type App = tide::Server>; -static INDEX_PAGE: &[u8] = include_bytes!("./index.html"); +static MICROPUB_CLIENT: &[u8] = include_bytes!("./index.html"); #[cfg(debug_assertions)] #[derive(Deserialize)] @@ -39,10 +39,11 @@ fn equip_app(mut app: App) -> App where Storage: database::Storage + Send + Sync + Clone { - app.at("/").get(|_: Request<_>| async move { - Ok(Response::builder(200).body(INDEX_PAGE).content_type("text/html").build()) - }); app.at("/micropub").with(check_auth).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()) + }); #[cfg(debug_assertions)] info!("Outfitting app with the debug function"); #[cfg(debug_assertions)] -- cgit 1.4.1