Making download endpoint available
This commit is contained in:
@@ -18,6 +18,7 @@ pub mod endpoints {
|
|||||||
pub const CREATESONG: &str = "/api/v2/song";
|
pub const CREATESONG: &str = "/api/v2/song";
|
||||||
pub const GETSONGS: &str = "/api/v2/song";
|
pub const GETSONGS: &str = "/api/v2/song";
|
||||||
pub const STREAMSONG: &str = "/api/v2/song/stream/{id}";
|
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 CREATECOVERART: &str = "/api/v2/coverart";
|
||||||
pub const GETCOVERART: &str = "/api/v2/coverart";
|
pub const GETCOVERART: &str = "/api/v2/coverart";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ pub mod init {
|
|||||||
crate::callers::endpoints::STREAMSONG,
|
crate::callers::endpoints::STREAMSONG,
|
||||||
get(crate::callers::song::endpoint::stream_song),
|
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 {
|
pub async fn app() -> axum::Router {
|
||||||
|
|||||||
Reference in New Issue
Block a user