mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-07 11:59:59 +03:00
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:
committed by
GitHub
parent
a987f93133
commit
648b2b58a4
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user