my-website-v2/backend/public/src/routes/root.rs

16 lines
332 B
Rust
Raw Normal View History

use axum::{
http::StatusCode,
response::{Html, IntoResponse},
};
pub struct RootRoute;
impl RootRoute {
pub async fn root() -> Html<&'static str> {
Html("<p>Copyright Wyatt J. Miller 2024</p>")
}
pub async fn not_found() -> impl IntoResponse {
(StatusCode::NOT_FOUND, "¯\\_(ツ)_/¯")
}
}