Made endpoint evailable

This commit is contained in:
kdeng00
2025-07-26 12:40:13 -04:00
parent fd7a88b6d0
commit d796cbcc16
3 changed files with 6 additions and 0 deletions
+1
View File
@@ -361,6 +361,7 @@ pub mod cov_db {
.map_err(|_e| sqlx::Error::RowNotFound) .map_err(|_e| sqlx::Error::RowNotFound)
.unwrap(), .unwrap(),
path: row.try_get("path").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() song_id: row.try_get("song_id").map_err(|_e| sqlx::Error::RowNotFound).unwrap()
}), }),
Err(_) => Err(sqlx::Error::RowNotFound), Err(_) => Err(sqlx::Error::RowNotFound),
+1
View File
@@ -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 CREATECOVERART: &str = "/api/v2/coverart"; pub const CREATECOVERART: &str = "/api/v2/coverart";
pub const GETCOVERART: &str = "/api/v2/coverart";
} }
pub mod response { pub mod response {
+4
View File
@@ -119,6 +119,10 @@ pub mod init {
crate::callers::endpoints::GETSONGS, crate::callers::endpoints::GETSONGS,
get(crate::callers::song::endpoint::get_songs), 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 { pub async fn app() -> axum::Router {