Added REST route to get the list of bridges

This commit is contained in:
2025-05-26 20:43:19 +02:00
parent de33c7d521
commit a8171375a8
5 changed files with 46 additions and 1 deletions

View File

@ -48,6 +48,10 @@ async fn main() -> std::io::Result<()> {
constants::QEMU_IMAGE_PROGRAM,
"QEMU disk image utility is required to manipulate QCow2 files!",
);
exec_utils::check_program(
constants::IP_PROGRAM,
"ip is required to access bridges information!",
);
log::debug!("Create required directory, if missing");
files_utils::create_directory_if_missing(AppConfig::get().iso_storage_path()).unwrap();
@ -137,6 +141,10 @@ async fn main() -> std::io::Result<()> {
"/api/server/networks",
web::get().to(server_controller::networks_list),
)
.route(
"/api/server/bridges",
web::get().to(server_controller::bridges_list),
)
// Auth controller
.route(
"/api/auth/local",