From c4426de586125813dff44bcf0d0104b64453d762 Mon Sep 17 00:00:00 2001 From: catvayor Date: Wed, 12 Jun 2024 16:41:24 +0200 Subject: [PATCH] module separation --- src/admin.rs | 88 ++++++++ src/global.rs | 269 ++++++++++++++++++++++++ src/main.rs | 570 +------------------------------------------------- src/track.rs | 235 +++++++++++++++++++++ 4 files changed, 602 insertions(+), 560 deletions(-) create mode 100644 src/admin.rs create mode 100644 src/global.rs create mode 100644 src/track.rs diff --git a/src/admin.rs b/src/admin.rs new file mode 100644 index 0000000..1cf53d3 --- /dev/null +++ b/src/admin.rs @@ -0,0 +1,88 @@ +use rocket::{ + response::stream::{Event, EventStream}, + serde::json::Json, + tokio::{ + select, + time::{self}, + }, + Route, Shutdown, State, +}; +use rocket_dyn_templates::{context, Template}; + +use crate::global::*; + +#[get("/?&")] +fn admin_page( + tok: Option, + dbg: Option, + admin_key: &State, +) -> Option