mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-06 04:36:32 +00:00
Fix cli webhook getting stored in dumps
This commit is contained in:
@ -75,10 +75,11 @@ impl DumpWriter {
|
|||||||
Ok(std::fs::write(self.dir.path().join("network.json"), serde_json::to_string(&network)?)?)
|
Ok(std::fs::write(self.dir.path().join("network.json"), serde_json::to_string(&network)?)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn create_webhooks(&self, webhooks: Webhooks) -> Result<()> {
|
pub fn create_webhooks(&self, mut webhooks: Webhooks) -> Result<()> {
|
||||||
if webhooks == Webhooks::default() {
|
if webhooks == Webhooks::default() {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
webhooks.webhooks.remove(&Uuid::nil()); // Don't store the cli webhook
|
||||||
Ok(std::fs::write(
|
Ok(std::fs::write(
|
||||||
self.dir.path().join("webhooks.json"),
|
self.dir.path().join("webhooks.json"),
|
||||||
serde_json::to_string(&webhooks)?,
|
serde_json::to_string(&webhooks)?,
|
||||||
|
Reference in New Issue
Block a user