add: shared structs, caching services, import task change

This commit is contained in:
wymiller committed 2026-11-09 00:04:22 -05:00
1 parent b64d5ba0ad
commit 5cb5dd8eb8
41 files changed
+875 -770

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
use axum::{
http::StatusCode,
response::{Html, IntoResponse},
routing::get,
Router,
};
pub struct RootRoute;
impl RootRoute {
pub fn routes() -> Router {
Router::new()
.route("/", get(RootRoute::root))
.route("/health", get(RootRoute::health))
}
async fn root() -> Html<&'static str> {
Html("<p>Copyright Wyatt J. Miller 2024</p>")
}
pub async fn not_found() -> impl IntoResponse {
(StatusCode::NOT_FOUND, "¯\\_(ツ)_/¯")
}
async fn health() -> impl IntoResponse {
StatusCode::OK
}
}