added crates to public project, made api structure

This commit is contained in:
wymiller committed 2024-09-22 22:38:35 -04:00
1 parent 3afff00b29
commit cf199ab48a
12 files changed
+2327 -2

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
pub struct AuthorsRoute;
impl AuthorsRoute {}
+2
View File
@@ -0,0 +1,2 @@
pub struct CommentsRoute;
impl CommentsRoute {}
+4
View File
@@ -0,0 +1,4 @@
pub mod authors;
pub mod comments;
pub mod posts;
pub mod root;
+2
View File
@@ -0,0 +1,2 @@
pub struct PostsRoute;
impl PostsRoute {}
+15
View File
@@ -0,0 +1,15 @@
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, "¯\\_(ツ)_/¯")
}
}