about summary refs log tree commit diff
path: root/splorm/src/handler/api
diff options
context:
space:
mode:
authorgennyble <gen@nyble.dev>2026-09-26 01:26:12 -0500
committergennyble <gen@nyble.dev>2026-09-26 01:26:12 -0500
commit8fe1cbd8a734f408b2aaca9598f5553b559c99a1 (patch)
tree8943c17fbc4cbb64b59da26b02399267173db296 /splorm/src/handler/api
parenta57518c42f01e7e40a2f54c04350d8f0ea33c1c4 (diff)
splorm documentation
Diffstat (limited to 'splorm/src/handler/api')
-rw-r--r--splorm/src/handler/api/auth.rs5
-rw-r--r--splorm/src/handler/api/mod.rs12
2 files changed, 17 insertions, 0 deletions
diff --git a/splorm/src/handler/api/auth.rs b/splorm/src/handler/api/auth.rs
index c91cee5..e90eafe 100644
--- a/splorm/src/handler/api/auth.rs
+++ b/splorm/src/handler/api/auth.rs
@@ -1,3 +1,8 @@
+//! `/api/auth`
+//!
+//! Routes dealing in authentication. Routes here integrate with `knowing`,
+//! which provides our authentication.
+
 use std::time::Duration;
 
 use axum::{body::Body, extract::State, http::StatusCode, response::Response};
diff --git a/splorm/src/handler/api/mod.rs b/splorm/src/handler/api/mod.rs
index c12b9c1..3630ca4 100644
--- a/splorm/src/handler/api/mod.rs
+++ b/splorm/src/handler/api/mod.rs
@@ -1,3 +1,14 @@
+//! nested `/api`
+//!
+//! Route handler for `/api` routes.
+//!
+//! | Handler | Route |
+//! | - | - |
+//! | [`auth::register`] | POST `/api/register` |
+//! | [`auth::login`] | POST `/api/login` |
+//! | [`auth::logout`] | POST `/api/logout` |
+//! | [`stats`] | GET `/api/stats/now/{name}` |
+
 mod auth;
 
 use axum::{
@@ -20,6 +31,7 @@ pub fn routes() -> Router<SplormState> {
 		.route("/stats/now/{name}", get(stats))
 }
 
+/// GET /api/stats/now/{name}
 async fn stats(
 	Path(name): Path<String>,
 	State(state): State<SplormState>,