This commit is contained in:
JMARyA 2024-08-01 16:42:58 +02:00
parent 5d2465353a
commit 52482085bc
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 11 additions and 1 deletions

View file

@ -32,6 +32,7 @@ async fn rocket() -> _ {
.mount(
"/",
routes![
route::index_redir,
route::artist::artists_route,
route::artist::artist_route,
route::album::albums_route,

View file

@ -1,4 +1,8 @@
use rocket::response::status::BadRequest;
use rocket::{
get,
response::{status::BadRequest, Redirect},
uri,
};
use serde_json::json;
pub mod album;
@ -31,3 +35,8 @@ pub async fn to_api(albums: &[impl ToAPI]) -> Vec<serde_json::Value> {
ret
}
#[get("/")]
pub async fn index_redir() -> Redirect {
Redirect::to(uri!("/web"))
}