The most crappy basic implementation, but: - It can list albums - It can list a single album's tracks - It can play a song Closes #1
14 lines
377 B
Rust
14 lines
377 B
Rust
use poem::web::Data;
|
|
use sqlx::SqlitePool;
|
|
|
|
use crate::{authentication::Authentication, subsonic::SubsonicResponse, utils};
|
|
|
|
#[poem::handler]
|
|
pub async fn ping(Data(pool): Data<&SqlitePool>, auth: Authentication) -> SubsonicResponse {
|
|
let u = utils::verify_user(pool, auth).await;
|
|
|
|
match u {
|
|
Ok(_) => SubsonicResponse::new_empty(),
|
|
Err(e) => e,
|
|
}
|
|
}
|