2022-12-10 02:10:14 +00:00
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
|
|
use actix_web::{get, web, Responder};
|
|
|
|
|
|
|
|
use crate::storage::IStorage;
|
|
|
|
|
|
|
|
#[get("/stats")]
|
|
|
|
pub async fn decky_statistics(data: actix_web::web::Data<Box<dyn IStorage>>) -> impl Responder {
|
2023-07-01 00:21:24 +01:00
|
|
|
println!("stats");
|
2022-12-10 02:10:14 +00:00
|
|
|
let plugins: HashMap<String, u64> = data.get_statistics();
|
|
|
|
web::Json(plugins)
|
|
|
|
}
|