add: shared structs, caching services, import task change
This commit is contained in:
41 files changed
+875
-770
No files matched your search
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user