mirror of
https://github.com/nicoburns/blessed-rs
synced 2024-11-22 19:53:04 +00:00
Make index page redirect to rather than duplicate crates page
This commit is contained in:
parent
7a4b12dd7f
commit
caf1a1263b
1 changed files with 2 additions and 1 deletions
|
@ -2,6 +2,7 @@ use axum::{
|
|||
routing::{get, post, get_service},
|
||||
Router,
|
||||
http::StatusCode,
|
||||
response::Redirect,
|
||||
};
|
||||
use std::net::{SocketAddr, IpAddr};
|
||||
use tower_http::{services::ServeDir, trace::TraceLayer};
|
||||
|
@ -21,7 +22,7 @@ async fn main() {
|
|||
|
||||
// build our application with a route
|
||||
let app = Router::new()
|
||||
.route("/", get(routes::crates::list::run))
|
||||
.route("/", get(|| async { Redirect::to("/crates") }))
|
||||
.route("/users", post(routes::users::create::run))
|
||||
.route("/crates", get(routes::crates::list::run))
|
||||
.nest("/static", static_file_service)
|
||||
|
|
Loading…
Reference in a new issue