diff options
author | Vika <vika@fireburn.ru> | 2021-05-05 18:16:08 +0300 |
---|---|---|
committer | Vika <vika@fireburn.ru> | 2021-05-05 18:16:08 +0300 |
commit | dd9d3ff3e9505926e72df7df679cefe960be23bd (patch) | |
tree | 77d08b9daff8553bd2ca98b9c7af9f211c5d730f /src | |
parent | 48968b403b7250c9f4ccd18e5cc22e2fe3612a8e (diff) | |
download | kittybox-dd9d3ff3e9505926e72df7df679cefe960be23bd.tar.zst |
Moved the client to /micropub/client
Diffstat (limited to 'src')
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 5 insertions, 4 deletions
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<Storage> = tide::Server<ApplicationState<Storage>>; -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<Storage>(mut app: App<Storage>) -> App<Storage> 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)] |