Skip to content

Commit

Permalink
fix volumes show command
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldwan committed Dec 21, 2020
1 parent e4238d9 commit c9bf5aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
14 changes: 8 additions & 6 deletions api/resource_volumes.go
Expand Up @@ -89,12 +89,14 @@ func (c *Client) DeleteVolume(volID string) (App *App, err error) {
func (c *Client) GetVolume(volID string) (Volume *Volume, err error) {
query := `
query($id: ID!) {
Volume(id: $id) {
id
name
sizeGb
region
createdAt
volume: node(id: $id) {
... on Volume {
id
name
sizeGb
region
createdAt
}
}
}`

Expand Down
3 changes: 2 additions & 1 deletion cmd/volumes.go
Expand Up @@ -132,8 +132,9 @@ func runDestroyVolume(ctx *cmdctx.CmdContext) error {
}

func runShowVolume(ctx *cmdctx.CmdContext) error {
volumeID := ctx.Args[0]

volume, err := ctx.Client.API().GetVolume(ctx.AppName)
volume, err := ctx.Client.API().GetVolume(volumeID)

if err != nil {
return err
Expand Down

0 comments on commit c9bf5aa

Please sign in to comment.