api: add some missing sorted macro calls
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
5408e30ab1
commit
8721b42e2f
@ -2,6 +2,7 @@
|
||||
|
||||
use proxmox_router::list_subdirs_api_method;
|
||||
use proxmox_router::{Router, SubdirMap};
|
||||
use proxmox_sys::sortable;
|
||||
|
||||
pub mod datastore;
|
||||
pub mod namespace;
|
||||
@ -9,12 +10,13 @@ pub mod sync;
|
||||
pub mod traffic_control;
|
||||
pub mod verify;
|
||||
|
||||
const SUBDIRS: SubdirMap = &[
|
||||
#[sortable]
|
||||
const SUBDIRS: SubdirMap = &sorted!([
|
||||
("datastore", &datastore::ROUTER),
|
||||
("sync", &sync::ROUTER),
|
||||
("traffic-control", &traffic_control::ROUTER),
|
||||
("verify", &verify::ROUTER),
|
||||
];
|
||||
]);
|
||||
|
||||
pub const ROUTER: Router = Router::new()
|
||||
.get(&list_subdirs_api_method!(SUBDIRS))
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
use proxmox_router::list_subdirs_api_method;
|
||||
use proxmox_router::{Router, SubdirMap};
|
||||
use proxmox_sys::sortable;
|
||||
|
||||
pub mod access;
|
||||
pub mod acme;
|
||||
@ -16,7 +17,8 @@ pub mod tape_encryption_keys;
|
||||
pub mod traffic_control;
|
||||
pub mod verify;
|
||||
|
||||
const SUBDIRS: SubdirMap = &[
|
||||
#[sortable]
|
||||
const SUBDIRS: SubdirMap = &sorted!([
|
||||
("access", &access::ROUTER),
|
||||
("acme", &acme::ROUTER),
|
||||
("changer", &changer::ROUTER),
|
||||
@ -29,7 +31,7 @@ const SUBDIRS: SubdirMap = &[
|
||||
("tape-encryption-keys", &tape_encryption_keys::ROUTER),
|
||||
("traffic-control", &traffic_control::ROUTER),
|
||||
("verify", &verify::ROUTER),
|
||||
];
|
||||
]);
|
||||
|
||||
pub const ROUTER: Router = Router::new()
|
||||
.get(&list_subdirs_api_method!(SUBDIRS))
|
||||
|
@ -503,13 +503,13 @@ pub async fn scan_remote_groups(
|
||||
}
|
||||
|
||||
#[sortable]
|
||||
const DATASTORE_SCAN_SUBDIRS: SubdirMap = &[
|
||||
const DATASTORE_SCAN_SUBDIRS: SubdirMap = &sorted!([
|
||||
("groups", &Router::new().get(&API_METHOD_SCAN_REMOTE_GROUPS)),
|
||||
(
|
||||
"namespaces",
|
||||
&Router::new().get(&API_METHOD_SCAN_REMOTE_NAMESPACES),
|
||||
),
|
||||
];
|
||||
]);
|
||||
|
||||
const DATASTORE_SCAN_ROUTER: Router = Router::new()
|
||||
.get(&list_subdirs_api_method!(DATASTORE_SCAN_SUBDIRS))
|
||||
|
@ -1,5 +1,7 @@
|
||||
//! The Proxmox Backup Server API
|
||||
|
||||
use proxmox_sys::sortable;
|
||||
|
||||
pub mod access;
|
||||
pub mod admin;
|
||||
pub mod backup;
|
||||
@ -16,7 +18,8 @@ pub mod version;
|
||||
|
||||
use proxmox_router::{list_subdirs_api_method, Router, SubdirMap};
|
||||
|
||||
const SUBDIRS: SubdirMap = &[
|
||||
#[sortable]
|
||||
const SUBDIRS: SubdirMap = &sorted!([
|
||||
("access", &access::ROUTER),
|
||||
("admin", &admin::ROUTER),
|
||||
("backup", &backup::ROUTER),
|
||||
@ -28,7 +31,7 @@ const SUBDIRS: SubdirMap = &[
|
||||
("status", &status::ROUTER),
|
||||
("tape", &tape::ROUTER),
|
||||
("version", &version::ROUTER),
|
||||
];
|
||||
]);
|
||||
|
||||
pub const ROUTER: Router = Router::new()
|
||||
.get(&list_subdirs_api_method!(SUBDIRS))
|
||||
|
Loading…
Reference in New Issue
Block a user