2022-12-08 02:30:10 +00:00
|
|
|
use decky_api::StorePluginList;
|
|
|
|
|
2022-12-10 02:10:14 +00:00
|
|
|
use actix_web::{get, web, Responder};
|
|
|
|
|
|
|
|
use crate::storage::IStorage;
|
2022-12-08 02:30:10 +00:00
|
|
|
|
|
|
|
#[get("/plugins")]
|
2022-12-10 02:10:14 +00:00
|
|
|
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();
|
2022-12-10 02:10:14 +00:00
|
|
|
web::Json(plugins)
|
2022-12-08 02:30:10 +00:00
|
|
|
}
|