mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-23 13:10:06 +01:00
change index create http code
This commit is contained in:
parent
fddc60f893
commit
9681ffca52
@ -54,7 +54,7 @@ async fn create_index(
|
||||
) -> Result<HttpResponse, ResponseError> {
|
||||
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<Utc>,
|
||||
primary_key: Option<String>,
|
||||
}
|
||||
|
||||
async fn get_index(
|
||||
data: GuardedData<Private, Data>,
|
||||
path: web::Path<IndexParam>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user