fix: alias enable/enabled in settings (#2021)

This commit is contained in:
Ellie Huxtable 2024-05-14 10:23:05 +07:00 committed by GitHub
parent 7672286814
commit 58f0bd61e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

View File

@ -346,6 +346,7 @@ pub struct Preview {
pub struct Daemon {
/// Use the daemon to sync
/// If enabled, requires a running daemon with `atuin daemon`
#[serde(alias = "enable")]
pub enabled: bool,
/// The daemon will handle sync on an interval. How often to sync, in seconds.

View File

@ -2,5 +2,6 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize, Clone, Default)]
pub struct Settings {
#[serde(alias = "enable")]
pub enabled: bool,
}

View File

@ -104,6 +104,7 @@ pub fn example_config() -> &'static str {
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct Tls {
#[serde(alias = "enabled")]
pub enable: bool,
pub cert_path: PathBuf,