minor api nitpick

This commit is contained in:
Hamcha 2024-04-17 00:11:29 +02:00
parent 915b680070
commit 9e19eae323
Signed by: hamcha
GPG Key ID: 1669C533B8CF6D89
2 changed files with 2 additions and 5 deletions

View File

@ -32,7 +32,7 @@ pub(super) fn router() -> Router<AppState> {
}),
)
.route("/:container/", get(read::get_one))
.route("/:container/log", get(log::get))
.route("/:container/logs", get(log::get))
.route("/:container/start", post(container_command!(start)))
.route("/:container/stop", post(container_command!(stop)))
.route("/:container/restart", post(container_command!(restart)))

View File

@ -14,10 +14,7 @@ pub(super) async fn get_one(
) -> Result<impl IntoResponse> {
let info = get_info(&state.docker, &container_name).await?;
Ok(Json(json!({
"name": container_name,
"info": info,
})))
Ok(Json(json!(info)))
}
pub(super) async fn get_all(State(state): State<AppState>) -> Result<impl IntoResponse> {