Made delete song endpoint available
This commit is contained in:
@@ -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}";
|
||||
|
||||
+2
-1
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user