Delete song endpoint #167

Merged
kdeng00 merged 13 commits from delete_song into v0.2 2025-07-29 21:34:16 -04:00
2 changed files with 3 additions and 1 deletions
Showing only changes of commit 87907ce5e7 - Show all commits
+1
View File
@@ -19,6 +19,7 @@ pub mod endpoints {
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 DOWNLOADSONG: &str = "/api/v2/song/download/{id}";
pub const DELETESONG: &str = "/api/v2/song/{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";
pub const DOWNLOADCOVERART: &str = "/api/v2/coverart/download/{id}"; pub const DOWNLOADCOVERART: &str = "/api/v2/coverart/download/{id}";
+2 -1
View File
@@ -44,7 +44,7 @@ async fn main() {
} }
pub mod init { pub mod init {
use axum::routing::{get, patch, post}; use axum::routing::{delete, get, patch, post};
use std::time::Duration; use std::time::Duration;
use tower_http::timeout::TimeoutLayer; use tower_http::timeout::TimeoutLayer;
@@ -135,6 +135,7 @@ pub mod init {
crate::callers::endpoints::DOWNLOADSONG, crate::callers::endpoints::DOWNLOADSONG,
get(crate::callers::song::endpoint::download_song), 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 { pub async fn app() -> axum::Router {