mirror of
https://github.com/chatmail/core.git
synced 2026-04-27 10:26:29 +03:00
Add set_config_bool, fix rust test to test the current expected behavior
This commit is contained in:
@@ -290,6 +290,11 @@ impl Context {
|
||||
_ => self.sql.set_raw_config(self, key, value).await,
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn set_config_bool(&self, key: Config, value: bool) -> crate::sql::Result<()> {
|
||||
self.set_config(key, if value { Some("1") } else { None })
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns all available configuration keys concated together.
|
||||
|
||||
Reference in New Issue
Block a user