From 8754cf5bc1968715bb28e70bb612167020130773 Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Mon, 27 Nov 2023 19:52:03 -0700 Subject: [PATCH] day -1 --- src/main.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 988779a..c54e33d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,13 +1,21 @@ use rocket::{get, routes}; +use rocket::http::Status; + #[get("/")] fn index() -> &'static str { "Hello, world!" } +#[get("/-1/error")] +fn error() -> Status{ +Status::InternalServerError +} + + #[shuttle_runtime::main] async fn main() -> shuttle_rocket::ShuttleRocket { - let rocket = rocket::build().mount("/", routes![index]); + let rocket = rocket::build().mount("/", routes![index, error]); Ok(rocket.into()) }