mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
implement list api keys
This commit is contained in:
parent
4d9819f6ef
commit
bead4075d8
1 changed files with 5 additions and 1 deletions
|
@ -18,5 +18,9 @@ struct KeysResponse {
|
||||||
|
|
||||||
#[get("/keys", wrap = "Authentication::Admin")]
|
#[get("/keys", wrap = "Authentication::Admin")]
|
||||||
async fn list(_data: web::Data<Data>) -> HttpResponse {
|
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,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue