minor api nitpick
This commit is contained in:
parent
915b680070
commit
9e19eae323
|
@ -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)))
|
||||
|
|
|
@ -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> {
|
||||
|
|
Loading…
Reference in New Issue