fixed commands not parsing
This commit is contained in:
parent
5b5a084939
commit
2734446d60
@ -499,7 +499,7 @@ func (con Connection) RunCommand(ctx *gin.Context) {
|
||||
|
||||
type Commands struct {
|
||||
CommandType string `json:"CommandType"`
|
||||
Arguments []any `json:"Arguments"`
|
||||
Arguments [4]any `json:"Arguments"`
|
||||
}
|
||||
|
||||
func (con Connection) AttachServer(ctx *gin.Context) {
|
||||
@ -603,10 +603,10 @@ func (con Connection) AttachServer(ctx *gin.Context) {
|
||||
|
||||
case "resize":
|
||||
log.Printf("Fake resize %dx%d", Command.Arguments[0].(uint), Command.Arguments[1].(uint))
|
||||
// err2 := con.dockerClient.ContainerResize(context.TODO(), containers[0].ID, container.ResizeOptions{Height: Command.Arguments[1].(uint), Width: Command.Arguments[0].(uint)})
|
||||
// if err2 != nil {
|
||||
// log.Printf("Failed to resize container to %dx%d: %s", Command.Arguments[0].(uint), Command.Arguments[1].(uint), err)
|
||||
// }
|
||||
err2 := con.dockerClient.ContainerResize(context.TODO(), containers[0].ID, container.ResizeOptions{Height: Command.Arguments[1].(uint), Width: Command.Arguments[0].(uint)})
|
||||
if err2 != nil {
|
||||
log.Printf("Failed to resize container to %dx%d: %s", Command.Arguments[0].(uint), Command.Arguments[1].(uint), err)
|
||||
}
|
||||
|
||||
// hijacked, err2 = con.dockerClient.ContainerAttach(context.TODO(), containers[0].ID, container.AttachOptions{Stream: true, Stdin: true, Stdout: true, Stderr: true})
|
||||
// if err2 != nil {
|
||||
|
Loading…
x
Reference in New Issue
Block a user