mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
fix snapshots
This commit is contained in:
parent
2b154524bb
commit
33830d5ecf
15 changed files with 109 additions and 101 deletions
|
@ -84,9 +84,9 @@ async fn delete_document(
|
|||
.delete_documents(path.index_uid.clone(), vec![path.document_id.clone()])
|
||||
.await
|
||||
{
|
||||
Ok(update_status) => {
|
||||
Ok(HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() })))
|
||||
}
|
||||
Ok(update_status) => Ok(
|
||||
HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() }))
|
||||
),
|
||||
Err(e) => {
|
||||
Ok(HttpResponse::BadRequest().json(serde_json::json!({ "error": e.to_string() })))
|
||||
}
|
||||
|
@ -163,9 +163,9 @@ async fn add_documents(
|
|||
.await;
|
||||
|
||||
match addition_result {
|
||||
Ok(update_status) => {
|
||||
Ok(HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() })))
|
||||
}
|
||||
Ok(update_status) => Ok(
|
||||
HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() }))
|
||||
),
|
||||
Err(e) => {
|
||||
Ok(HttpResponse::BadRequest().json(serde_json::json!({ "error": e.to_string() })))
|
||||
}
|
||||
|
@ -242,9 +242,9 @@ async fn delete_documents(
|
|||
.collect();
|
||||
|
||||
match data.delete_documents(path.index_uid.clone(), ids).await {
|
||||
Ok(update_status) => {
|
||||
Ok(HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() })))
|
||||
}
|
||||
Ok(update_status) => Ok(
|
||||
HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() }))
|
||||
),
|
||||
Err(e) => {
|
||||
Ok(HttpResponse::BadRequest().json(serde_json::json!({ "error": e.to_string() })))
|
||||
}
|
||||
|
@ -258,9 +258,9 @@ async fn clear_all_documents(
|
|||
path: web::Path<IndexParam>,
|
||||
) -> Result<HttpResponse, ResponseError> {
|
||||
match data.clear_documents(path.index_uid.clone()).await {
|
||||
Ok(update_status) => {
|
||||
Ok(HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() })))
|
||||
}
|
||||
Ok(update_status) => Ok(
|
||||
HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_status.id() }))
|
||||
),
|
||||
Err(e) => {
|
||||
Ok(HttpResponse::BadRequest().json(serde_json::json!({ "error": e.to_string() })))
|
||||
}
|
||||
|
|
|
@ -143,9 +143,9 @@ async fn update_all(
|
|||
.update_settings(index_uid.into_inner(), body.into_inner(), true)
|
||||
.await
|
||||
{
|
||||
Ok(update_result) => {
|
||||
Ok(HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_result.id() })))
|
||||
}
|
||||
Ok(update_result) => Ok(
|
||||
HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_result.id() }))
|
||||
),
|
||||
Err(e) => {
|
||||
Ok(HttpResponse::BadRequest().json(serde_json::json!({ "error": e.to_string() })))
|
||||
}
|
||||
|
@ -175,9 +175,9 @@ async fn delete_all(
|
|||
.update_settings(index_uid.into_inner(), settings, false)
|
||||
.await
|
||||
{
|
||||
Ok(update_result) => {
|
||||
Ok(HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_result.id() })))
|
||||
}
|
||||
Ok(update_result) => Ok(
|
||||
HttpResponse::Accepted().json(serde_json::json!({ "updateId": update_result.id() }))
|
||||
),
|
||||
Err(e) => {
|
||||
Ok(HttpResponse::BadRequest().json(serde_json::json!({ "error": e.to_string() })))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue