implement list api keys
@@ -18,5 +18,9 @@ struct KeysResponse {
#[get("/keys", wrap = "Authentication::Admin")]
async fn list(_data: web::Data<Data>) -> HttpResponse {
- todo!()
+ let api_keys = data.api_keys.clone();
+ HttpResponse::Ok().json(KeysResponse {
+ private: api_keys.private,
+ public: api_keys.public,
+ })
}
