diff --git a/src/callers/mod.rs b/src/callers/mod.rs index b04f7a2..e0bfeda 100644 --- a/src/callers/mod.rs +++ b/src/callers/mod.rs @@ -18,6 +18,7 @@ pub mod endpoints { pub const CREATESONG: &str = "/api/v2/song"; 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 CREATECOVERART: &str = "/api/v2/coverart"; pub const GETCOVERART: &str = "/api/v2/coverart"; } diff --git a/src/main.rs b/src/main.rs index d1d99f7..55c0ac4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -127,6 +127,7 @@ pub mod init { crate::callers::endpoints::STREAMSONG, get(crate::callers::song::endpoint::stream_song), ) + .route(crate::callers::endpoints::DOWNLOADSONG, get(crate::callers::song::endpoint::download_song)) } pub async fn app() -> axum::Router {