From bead4075d8bbc9913b33d66aacd386251dd2e6c5 Mon Sep 17 00:00:00 2001 From: mpostma Date: Tue, 16 Feb 2021 15:28:19 +0100 Subject: [PATCH] implement list api keys --- src/routes/key.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes/key.rs b/src/routes/key.rs index be089beb2..7fb6ae00a 100644 --- a/src/routes/key.rs +++ b/src/routes/key.rs @@ -18,5 +18,9 @@ struct KeysResponse { #[get("/keys", wrap = "Authentication::Admin")] async fn list(_data: web::Data) -> HttpResponse { - todo!() + let api_keys = data.api_keys.clone(); + HttpResponse::Ok().json(KeysResponse { + private: api_keys.private, + public: api_keys.public, + }) }