singles
This commit is contained in:
parent
52482085bc
commit
952129d454
2 changed files with 22 additions and 6 deletions
|
@ -16,10 +16,12 @@ use crate::route::to_api;
|
|||
#[get("/artist/<artist_id>/albums")]
|
||||
pub async fn albums_route(artist_id: &str, lib: &State<Libary>) -> FallibleApiResponse {
|
||||
let albums = lib.get_albums_by_artist(artist_id).await;
|
||||
let singles = lib.get_singles_by_artist(artist_id).await;
|
||||
|
||||
Ok(json!({
|
||||
"artist": artist_id,
|
||||
"albums": to_api(&albums).await
|
||||
"albums": to_api(&albums).await,
|
||||
"singles": to_api(&singles).await
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue