mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
update the settings routes
This commit is contained in:
parent
96cffeab1e
commit
79c63049d7
2 changed files with 9 additions and 2 deletions
|
@ -131,7 +131,9 @@ async fn update_all(
|
|||
.update_settings(index_uid.into_inner(), body.into_inner(), true)
|
||||
.await
|
||||
{
|
||||
Ok(update_result) => Ok(HttpResponse::Accepted().json(update_result)),
|
||||
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() })))
|
||||
}
|
||||
|
@ -161,7 +163,9 @@ async fn delete_all(
|
|||
.update_settings(index_uid.into_inner(), settings, false)
|
||||
.await
|
||||
{
|
||||
Ok(update_result) => Ok(HttpResponse::Accepted().json(update_result)),
|
||||
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