basic saving functionality

This commit is contained in:
Ferdinand Schober
2025-03-23 16:35:11 +01:00
committed by Ferdinand Schober
parent 18bba183ee
commit a29489cd40
5 changed files with 36 additions and 5 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(())
}