mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-12-25 14:10:06 +01:00
restore update documents
This commit is contained in:
parent
581dcd5735
commit
181eaf95f5
@ -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(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user