aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorTolmachev Igor <me@igorek.dev>2025-10-18 14:59:43 +0300
committerTolmachev Igor <me@igorek.dev>2025-10-18 14:59:43 +0300
commit67ed4e6bb82ac2645f9b7a014a8d635d7b80e821 (patch)
tree2b5fec154c95d53bdc818bbdd2fac2e695e0157a /src/main.rs
parentacf3f72d2d0b8e4b96809783cb82cefbbc23441f (diff)
downloadqueue_server-67ed4e6bb82ac2645f9b7a014a8d635d7b80e821.tar.gz
queue_server-67ed4e6bb82ac2645f9b7a014a8d635d7b80e821.zip
Add fallback handlers for 404 and 405
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index 560225e..4541646 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -38,6 +38,8 @@ async fn router() -> Router {
38 .layer(TraceLayer::new_for_http()) 38 .layer(TraceLayer::new_for_http())
39 .with_state(AppState { db, secret }) 39 .with_state(AppState { db, secret })
40 .merge(Scalar::with_url("/docs", api)) 40 .merge(Scalar::with_url("/docs", api))
41 .fallback(routers::not_found)
42 .method_not_allowed_fallback(routers::method_not_allowed)
41} 43}
42 44
43#[tokio::main] 45#[tokio::main]