fix
This commit is contained in:
parent
c97f6168a1
commit
636ad0bf34
1 changed files with 6 additions and 3 deletions
|
@ -21,9 +21,12 @@ pub async fn clean_library(lib: &State<Libary>, u: User) -> FallibleApiResponse
|
||||||
#[get("/library/singles")]
|
#[get("/library/singles")]
|
||||||
pub async fn get_singles_route(u: User) -> FallibleApiResponse {
|
pub async fn get_singles_route(u: User) -> FallibleApiResponse {
|
||||||
check_admin!(u);
|
check_admin!(u);
|
||||||
let singles = Track::find(doc! { "album_id": None::<String>}, None)
|
let singles = Track::find(
|
||||||
.await
|
doc! { "album_id": None::<String>, "artist_id": {"$ne": None::<String> }},
|
||||||
.unwrap();
|
None,
|
||||||
|
)
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
Ok(json!(to_api(&singles).await))
|
Ok(json!(to_api(&singles).await))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue