change index create http code

This commit is contained in:
mpostma 2021-07-05 10:10:17 +02:00
parent fddc60f893
commit 9681ffca52

View File

@ -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>,