diff --git a/acrate-inbox/src/main.rs b/acrate-inbox/src/main.rs index ee14d9a..8958b4c 100644 --- a/acrate-inbox/src/main.rs +++ b/acrate-inbox/src/main.rs @@ -1,6 +1,7 @@ use anyhow::Context; mod config; +mod route; #[tokio::main] @@ -9,7 +10,8 @@ async fn main() -> anyhow::Result { log::debug!("Logging initialized!"); log::trace!("Creating Axum router..."); - let app = axum::Router::new(); + let app = axum::Router::new() + .route("/inbox", axum::routing::post(route::inbox_handler)); log::trace!("Axum router created successfully!"); log::trace!("Creating Tokio listener..."); diff --git a/acrate-inbox/src/route.rs b/acrate-inbox/src/route.rs new file mode 100644 index 0000000..ca9ec6b --- /dev/null +++ b/acrate-inbox/src/route.rs @@ -0,0 +1,8 @@ +#[allow(unreachable_code)] +pub async fn inbox_handler() { + todo!("pre-validation hook"); + todo!("validate signature"); + todo!("post-validation hook"); + todo!("database storage"); + todo!("post-storage hook"); +}