summary refs log tree commit diff
path: root/src/api/routes
diff options
context:
space:
mode:
authorAshelyn Rose <git@ashen.earth>2024-10-26 02:20:32 -0400
committerAshelyn Rose <git@ashen.earth>2024-10-26 02:20:32 -0400
commit130669793dfb77b286a26a373378b4d1f2be837c (patch)
treeb2867473b4610e3f79c3098bf661435c25fcee5c /src/api/routes
parent2eee33d2a2042b209dd5f9ef4b7314ea81a33360 (diff)
Very basic rocket db state and session lookup (with hardcoded session id)
Diffstat (limited to 'src/api/routes')
-rw-r--r--src/api/routes/mod.rs1
-rw-r--r--src/api/routes/test.rs9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/api/routes/mod.rs b/src/api/routes/mod.rs
new file mode 100644
index 0000000..7b788c2
--- /dev/null
+++ b/src/api/routes/mod.rs
@@ -0,0 +1 @@
+pub mod test;
diff --git a/src/api/routes/test.rs b/src/api/routes/test.rs
new file mode 100644
index 0000000..718c634
--- /dev/null
+++ b/src/api/routes/test.rs
@@ -0,0 +1,9 @@
+use rocket::get;
+use rocket::serde::json::Json;
+
+use crate::db::models::auth::LoginSession;
+
+#[get("/test")]
+pub fn testroute(session: LoginSession) -> Json<LoginSession> {
+    Json(session)
+}