Save config (#345)

* add setters for clients and authorized keys

* impl change config request

* basic saving functionality

* save config automatically

* add TODO comment
This commit is contained in:
Ferdinand Schober
2026-02-07 18:36:07 +01:00
committed by GitHub
parent a987f93133
commit 648b2b58a4
7 changed files with 160 additions and 11 deletions

View File

@@ -71,6 +71,8 @@ enum CliSubcommand {
},
/// deauthorize a public key
RemoveAuthorizedKey { sha256_fingerprint: String },
/// save configuration to file
SaveConfig,
}
pub async fn run(args: CliArgs) -> Result<(), CliError> {
@@ -162,6 +164,7 @@ async fn execute(cmd: CliSubcommand) -> Result<(), CliError> {
tx.request(FrontendRequest::RemoveAuthorizedKey(sha256_fingerprint))
.await?
}
CliSubcommand::SaveConfig => tx.request(FrontendRequest::SaveConfiguration).await?,
}
Ok(())
}