use crate::State; use axum::{Json, extract::State as S}; use std::{collections::HashSet, sync::Arc}; use tokio::sync::RwLock; pub async fn api_queue_json(S(state): S>>) -> Json> { Json(state.read().await.queue.clone()) } pub async fn api_loading_json(S(state): S>>) -> Json> { Json(state.read().await.loading.clone()) } pub async fn api_complete_json(S(state): S>>) -> Json> { Json(state.read().await.complete.clone()) }