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,