Merge pull request #41 from meilisearch/list-keys

list keys
This commit is contained in:
marin 2021-02-16 16:39:24 +01:00 committed by GitHub
commit f175d20599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,
})
}