From 58515ddfecd3701112616c33ad4879dae4b38ffd Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Mon, 20 Jan 2025 22:15:14 +0100 Subject: save before disaster --- src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 2871fc7..f55a17c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,7 +21,7 @@ async fn main() -> std::io::Result<()> { let db_raw = database::DatabaseWrapper::new() .await - .expect("Something went wrong -- DatabaseWrapper::new()"); + .expect("Something went wrong while creating DatabaseWrapper"); let db = Arc::new(db_raw); let app_state = AppState { database: db }; @@ -29,9 +29,10 @@ async fn main() -> std::io::Result<()> { App::new() .app_data(web::Data::new(app_state.clone())) .route("/", web::get().to(root)) - .service(routes::song::song) + .service(routes::song::get_song) .service(routes::album::album) - .service(routes::artist::artist) + .service(routes::artist::get_artist) + .service(routes::artist::post_artist) .service(routes::search_results::search_results) }) .bind(("127.0.0.1", 8000))? -- cgit v1.2.3