summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index ba319d9..31271e4 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2,7 +2,7 @@ use axum::{
error_handling::HandleErrorLayer,
http::StatusCode,
response::IntoResponse,
- routing::get,
+ routing::{get, post, delete},
Json, Router
};
@@ -32,7 +32,10 @@ async fn main() {
let app = Router::new()
.route("/health", get(health_check))
- .route("/waifus/list", get(handlers::waifus::list))
+ .route("/ships/list", get(handlers::ships::list))
+ .route("/ships/new", post(handlers::ships::new))
+ .route("/ships/update", post(handlers::ships::update))
+ .route("/ships/delete/:shasum", delete(handlers::ships::delete))
.layer( ServiceBuilder::new()
.layer(HandleErrorLayer::new(|error: BoxError| async move {
if error.is::<tower::timeout::error::Elapsed>() {