Get coverart #163
@@ -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),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user