global: snapshot

This commit is contained in:
nym21
2025-03-11 15:36:40 +01:00
parent db70b05088
commit 64d73b93e4
19 changed files with 275 additions and 324 deletions
+5 -5
View File
@@ -3,19 +3,19 @@ use axum::{Router, routing::get};
use super::AppState;
mod file;
mod frontend;
mod minify;
mod website;
use file::{file_handler, index_handler};
pub use frontend::Frontend;
pub use website::Website;
pub trait FilesRoutes {
fn add_website_routes(self, frontend: Frontend) -> Self;
fn add_website_routes(self, website: Website) -> Self;
}
impl FilesRoutes for Router<AppState> {
fn add_website_routes(self, frontend: Frontend) -> Self {
if frontend.is_some() {
fn add_website_routes(self, website: Website) -> Self {
if website.is_some() {
self.route("/{*path}", get(file_handler))
.route("/", get(index_handler))
} else {