mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 12:27:13 +02:00
correct error on settings delete unexisting index
This commit is contained in:
parent
30dd790884
commit
66b64c1f80
3 changed files with 13 additions and 8 deletions
|
@ -129,8 +129,12 @@ impl IndexController {
|
|||
Ok(status)
|
||||
}
|
||||
|
||||
pub async fn update_settings(&self, index_uid: String, settings: Settings) -> anyhow::Result<UpdateStatus> {
|
||||
let uuid = self.uuid_resolver.get_or_create(index_uid).await?;
|
||||
pub async fn update_settings(&self, index_uid: String, settings: Settings, create: bool) -> anyhow::Result<UpdateStatus> {
|
||||
let uuid = if create {
|
||||
self.uuid_resolver.get_or_create(index_uid).await?
|
||||
} else {
|
||||
self.uuid_resolver.resolve(index_uid).await?
|
||||
};
|
||||
let meta = UpdateMeta::Settings(settings);
|
||||
// Nothing so send, drop the sender right away, as not to block the update actor.
|
||||
let (_, receiver) = mpsc::channel(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue