Can define bridge name
This commit is contained in:
@ -71,7 +71,15 @@ pub async fn update(
|
||||
path: web::Path<NetworkID>,
|
||||
body: web::Json<NetworkInfo>,
|
||||
) -> HttpResult {
|
||||
let mut network = body.0.to_virt_network()?;
|
||||
let mut network = match body.0.to_virt_network() {
|
||||
Ok(n) => n,
|
||||
Err(e) => {
|
||||
log::error!("Failed to extract network info! {e}");
|
||||
return Ok(
|
||||
HttpResponse::BadRequest().json(format!("Failed to extract network info!\n${e}"))
|
||||
);
|
||||
}
|
||||
};
|
||||
network.uuid = Some(path.uid);
|
||||
|
||||
if let Err(e) = client.update_network(network).await {
|
||||
|
Reference in New Issue
Block a user