restore update documents

This commit is contained in:
mpostma 2021-03-04 15:10:58 +01:00
parent 581dcd5735
commit 181eaf95f5
No known key found for this signature in database
GPG Key ID: CBC8A7C1D7A28C3A

View File

@ -199,26 +199,25 @@ async fn update_documents(
params: web::Query<UpdateDocumentsQuery>, params: web::Query<UpdateDocumentsQuery>,
body: web::Payload, body: web::Payload,
) -> Result<HttpResponse, ResponseError> { ) -> Result<HttpResponse, ResponseError> {
todo!() let addition_result = data
//let addition_result = data .add_documents(
//.add_documents( path.into_inner().index_uid,
//path.into_inner().index_uid, IndexDocumentsMethod::UpdateDocuments,
//IndexDocumentsMethod::UpdateDocuments, UpdateFormat::Json,
//UpdateFormat::Json, body,
//body, params.primary_key.clone(),
//params.primary_key.clone(), ).await;
//).await;
//match addition_result { match addition_result {
//Ok(update) => { Ok(update) => {
//let value = serde_json::to_string(&update).unwrap(); let value = serde_json::to_string(&update).unwrap();
//let response = HttpResponse::Ok().body(value); let response = HttpResponse::Ok().body(value);
//Ok(response) Ok(response)
//} }
//Err(e) => { Err(e) => {
//Ok(HttpResponse::BadRequest().body(serde_json::json!({ "error": e.to_string() }))) Ok(HttpResponse::BadRequest().body(serde_json::json!({ "error": e.to_string() })))
//} }
//} }
} }
#[post( #[post(