diff --git a/src/callers/coverart.rs b/src/callers/coverart.rs index 2d1a4bf..08b9f43 100644 --- a/src/callers/coverart.rs +++ b/src/callers/coverart.rs @@ -361,6 +361,7 @@ pub mod cov_db { .map_err(|_e| sqlx::Error::RowNotFound) .unwrap(), path: row.try_get("path").map_err(|_e| sqlx::Error::RowNotFound).unwrap(), + data: Vec::new(), song_id: row.try_get("song_id").map_err(|_e| sqlx::Error::RowNotFound).unwrap() }), Err(_) => Err(sqlx::Error::RowNotFound), diff --git a/src/callers/mod.rs b/src/callers/mod.rs index 6e31042..d81789b 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 CREATECOVERART: &str = "/api/v2/coverart"; + pub const GETCOVERART: &str = "/api/v2/coverart"; } pub mod response { diff --git a/src/main.rs b/src/main.rs index a122e09..c4fe0e4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -119,6 +119,10 @@ pub mod init { crate::callers::endpoints::GETSONGS, get(crate::callers::song::endpoint::get_songs), ) + .route( + crate::callers::endpoints::GETCOVERART, + get(crate::callers::coverart::endpoint::get_coverart) + ) } pub async fn app() -> axum::Router {