server: cleanup

This commit is contained in:
nym21
2025-02-13 11:10:34 +01:00
parent b034b4fe2f
commit 443a32dc81
19 changed files with 244 additions and 559 deletions

18
server/src/files/mod.rs Normal file
View File

@@ -0,0 +1,18 @@
use axum::{routing::get, Router};
use super::AppState;
mod file;
mod minify;
use file::{file_handler, index_handler};
pub trait FilesRoutes {
fn add_website_routes(self) -> Self;
}
impl FilesRoutes for Router<AppState> {
fn add_website_routes(self) -> Self {
self.route("/{*path}", get(file_handler)).route("/", get(index_handler))
}
}