Skip to content

Commit

Permalink
fix(server): properly format request-console JSON output (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Dec 12, 2023
1 parent b117c86 commit 40641b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions internal/cmd/server/request_console.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ var RequestConsoleCmd = base.Cmd{
}

if outOpts.IsSet("json") {
return util.DescribeJSON(struct {
WSSURL string
Password string
schema := struct {
WSSURL string `json:"wss_url"`
Password string `json:"password"`
}{
WSSURL: result.WSSURL,
Password: result.Password,
})
}

return util.DescribeJSON(schema)
}

cmd.Printf("Console for server %d:\n", server.ID)
Expand Down

0 comments on commit 40641b6

Please sign in to comment.