Skip to content

Commit

Permalink
Add redirect from / to /docs
Browse files Browse the repository at this point in the history
  • Loading branch information
LostLuma committed Nov 16, 2024
1 parent 9ad4cdd commit 42678ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions echo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub mod utils;
#[rocket::launch]
fn rocket() -> _ {
let routes = routes![
routes::get_root,
cors::snatcher,
docs::get_docs,
docs::get_spec,
Expand Down
7 changes: 7 additions & 0 deletions echo/src/routes/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
use rocket::{get, response::Redirect, uri};

pub mod docs;
pub mod health;
pub mod pastes;
pub mod security;

#[get("/")]
pub fn get_root() -> Redirect {
Redirect::temporary(uri!("/docs"))
}

0 comments on commit 42678ba

Please sign in to comment.