1
Fork 0

inbox: Add empty /inbox handler

This commit is contained in:
Steffo 2024-11-13 07:41:23 +01:00
parent 30610df0f5
commit 8552052a46
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0
2 changed files with 11 additions and 1 deletions

View file

@ -1,6 +1,7 @@
use anyhow::Context; use anyhow::Context;
mod config; mod config;
mod route;
#[tokio::main] #[tokio::main]
@ -9,7 +10,8 @@ async fn main() -> anyhow::Result<std::convert::Infallible> {
log::debug!("Logging initialized!"); log::debug!("Logging initialized!");
log::trace!("Creating Axum router..."); 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!("Axum router created successfully!");
log::trace!("Creating Tokio listener..."); log::trace!("Creating Tokio listener...");

View file

@ -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");
}