not-decky-store/src/not_decky/plugins.rs

12 lines
327 B
Rust
Raw Normal View History

2022-12-08 02:30:10 +00:00
use decky_api::StorePluginList;
use actix_web::{get, web, Responder};
use crate::storage::IStorage;
2022-12-08 02:30:10 +00:00
#[get("/plugins")]
pub async fn decky_plugins(data: actix_web::web::Data<Box<dyn IStorage>>) -> impl Responder {
2022-12-17 05:03:41 +00:00
let plugins: StorePluginList = web::block(move || data.plugins()).await.unwrap();
web::Json(plugins)
2022-12-08 02:30:10 +00:00
}