summaryrefslogtreecommitdiff
path: root/src/boot/routes.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
committerKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
commit1f769855df2d9cf2bca883a0475670f227e3678b (patch)
tree6c94d9c868eb022588a07245df978478034ac5dd /src/boot/routes.rs
parent8f360dd9cc45bb14431238ccc5e3d137c020fa7b (diff)
parent461814e5174cef1be3e07b4e4069314e9bcbedd6 (diff)
Merge branch 'main' into wip/mobile
Diffstat (limited to 'src/boot/routes.rs')
-rw-r--r--src/boot/routes.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/boot/routes.rs b/src/boot/routes.rs
deleted file mode 100644
index 80f70bd..0000000
--- a/src/boot/routes.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-use axum::{
- extract::{Json, State},
- routing::get,
- Router,
-};
-
-use super::Snapshot;
-use crate::{app::App, error::Internal, login::Login};
-
-#[cfg(test)]
-mod test;
-
-pub fn router() -> Router<App> {
- Router::new().route("/api/boot", get(boot))
-}
-
-async fn boot(State(app): State<App>, login: Login) -> Result<Json<Boot>, Internal> {
- let snapshot = app.boot().snapshot().await?;
- Ok(Boot { login, snapshot }.into())
-}
-
-#[derive(serde::Serialize)]
-struct Boot {
- login: Login,
- #[serde(flatten)]
- snapshot: Snapshot,
-}