From 9681ffca524defa8889135c0e3857cfbe27b8f96 Mon Sep 17 00:00:00 2001 From: mpostma Date: Mon, 5 Jul 2021 10:10:17 +0200 Subject: [PATCH] change index create http code --- meilisearch-http/src/routes/indexes/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meilisearch-http/src/routes/indexes/mod.rs b/meilisearch-http/src/routes/indexes/mod.rs index 89fa366cb..260d97ecd 100644 --- a/meilisearch-http/src/routes/indexes/mod.rs +++ b/meilisearch-http/src/routes/indexes/mod.rs @@ -54,7 +54,7 @@ async fn create_index( ) -> Result { let body = body.into_inner(); let meta = data.create_index(body.uid, body.primary_key).await?; - Ok(HttpResponse::Ok().json(meta)) + Ok(HttpResponse::Created().json(meta)) } #[derive(Debug, Deserialize)] @@ -73,6 +73,7 @@ pub struct UpdateIndexResponse { updated_at: DateTime, primary_key: Option, } + async fn get_index( data: GuardedData, path: web::Path,