feat: add nginx reload and validation wrappers with sudo permissions

This commit is contained in:
GW_MC
2025-12-22 17:18:36 +08:00
parent 6e85bda13f
commit 5cffb0a519
7 changed files with 323 additions and 13 deletions

View File

@@ -43,7 +43,7 @@ pub async fn validate(
}
};
let (_code, _output) = match nginx_controller
let resp = match nginx_controller
.validate(&params.config_name, params.timestamp)
.await
{
@@ -54,7 +54,7 @@ pub async fn validate(
}
};
(axum::http::StatusCode::OK,).into_response()
(axum::http::StatusCode::OK, axum::Json(resp)).into_response()
}
#[derive(Deserialize)]