diff --git a/src/callers/mod.rs b/src/callers/mod.rs index 3c6b223..cadc8ac 100644 --- a/src/callers/mod.rs +++ b/src/callers/mod.rs @@ -19,6 +19,7 @@ pub mod endpoints { pub const GETSONGS: &str = "/api/v2/song"; pub const STREAMSONG: &str = "/api/v2/song/stream/{id}"; pub const DOWNLOADSONG: &str = "/api/v2/song/download/{id}"; + pub const DELETESONG: &str = "/api/v2/song/{id}"; pub const CREATECOVERART: &str = "/api/v2/coverart"; pub const GETCOVERART: &str = "/api/v2/coverart"; pub const DOWNLOADCOVERART: &str = "/api/v2/coverart/download/{id}"; diff --git a/src/main.rs b/src/main.rs index e1c8186..48447b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,7 +44,7 @@ async fn main() { } pub mod init { - use axum::routing::{get, patch, post}; + use axum::routing::{delete, get, patch, post}; use std::time::Duration; use tower_http::timeout::TimeoutLayer; @@ -135,6 +135,7 @@ pub mod init { crate::callers::endpoints::DOWNLOADSONG, get(crate::callers::song::endpoint::download_song), ) + .route(crate::callers::endpoints::DELETESONG, delete(crate::callers::song::endpoint::delete_song)) } pub async fn app() -> axum::Router {