apt: use typed response for get_versions

...and cleanup get_versions for manager CLI.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter
2020-11-12 10:12:54 +01:00
committed by Thomas Lamprecht
parent 87367decf2
commit 5e293f1315
2 changed files with 4 additions and 10 deletions

View File

@ -261,7 +261,7 @@ fn apt_get_changelog(
},
)]
/// Get package information for important Proxmox Backup Server packages.
pub fn get_versions() -> Result<Value, Error> {
pub fn get_versions() -> Result<Vec<APTUpdateInfo>, Error> {
const PACKAGES: &[&str] = &[
"ifupdown2",
"libjs-extjs",
@ -350,7 +350,7 @@ pub fn get_versions() -> Result<Value, Error> {
}
}
Ok(json!(packages))
Ok(packages)
}
const SUBDIRS: SubdirMap = &[