implement update index

This commit is contained in:
mpostma 2021-03-12 14:48:43 +01:00
parent 77d5dd452f
commit c4846dafca
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
6 changed files with 75 additions and 15 deletions

View file

@ -95,7 +95,7 @@ async fn update_index(
path: web::Path<IndexParam>,
body: web::Json<UpdateIndexRequest>,
) -> Result<HttpResponse, ResponseError> {
match data.update_index(&path.index_uid, body.primary_key.as_ref(), body.name.as_ref()) {
match data.update_index(&path.index_uid, body.primary_key.as_ref(), body.name.as_ref()).await {
Ok(meta) => {
let json = serde_json::to_string(&meta).unwrap();
Ok(HttpResponse::Ok().body(json))