From 130669793dfb77b286a26a373378b4d1f2be837c Mon Sep 17 00:00:00 2001 From: Ashelyn Rose Date: Sat, 26 Oct 2024 02:20:32 -0400 Subject: Very basic rocket db state and session lookup (with hardcoded session id) --- src/api/routes/mod.rs | 1 + src/api/routes/test.rs | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/api/routes/mod.rs create mode 100644 src/api/routes/test.rs (limited to 'src/api/routes') 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 { + Json(session) +} -- cgit 1.4.1