mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-29 16:45:30 +08: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> {
|
) -> Result<HttpResponse, ResponseError> {
|
||||||
let body = body.into_inner();
|
let body = body.into_inner();
|
||||||
let meta = data.create_index(body.uid, body.primary_key).await?;
|
let meta = data.create_index(body.uid, body.primary_key).await?;
|
||||||
Ok(HttpResponse::Ok().json(meta))
|
Ok(HttpResponse::Created().json(meta))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
@ -73,6 +73,7 @@ pub struct UpdateIndexResponse {
|
|||||||
updated_at: DateTime<Utc>,
|
updated_at: DateTime<Utc>,
|
||||||
primary_key: Option<String>,
|
primary_key: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_index(
|
async fn get_index(
|
||||||
data: GuardedData<Private, Data>,
|
data: GuardedData<Private, Data>,
|
||||||
path: web::Path<IndexParam>,
|
path: web::Path<IndexParam>,
|
||||||
|
Loading…
Reference in New Issue
Block a user