mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
implement list indexes
This commit is contained in:
parent
d9254c4355
commit
281a445998
5 changed files with 95 additions and 29 deletions
|
@ -21,7 +21,7 @@ pub fn services(cfg: &mut web::ServiceConfig) {
|
|||
|
||||
#[get("/indexes", wrap = "Authentication::Private")]
|
||||
async fn list_indexes(data: web::Data<Data>) -> Result<HttpResponse, ResponseError> {
|
||||
match data.list_indexes() {
|
||||
match data.list_indexes().await {
|
||||
Ok(indexes) => {
|
||||
let json = serde_json::to_string(&indexes).unwrap();
|
||||
Ok(HttpResponse::Ok().body(&json))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue