Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions in_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,9 @@ func (c *InCommand) Run(destDir string, request InRequest) (InResponse, error) {
return InResponse{}, err
}

latestStatus := ""
if len(statuses) > 0 {
latestStatus = *statuses[0].State
}

return InResponse{
Version: Version{
ID: strconv.FormatInt(*deployment.ID, 10),
Statuses: latestStatus,
ID: strconv.FormatInt(*deployment.ID, 10),
},
Metadata: metadataFromDeployment(deployment, statuses),
}, nil
Expand Down
8 changes: 1 addition & 7 deletions out_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,9 @@ func (c *OutCommand) Run(sourceDir string, request OutRequest) (OutResponse, err
return OutResponse{}, err
}

latestStatus := ""
if len(statuses) > 0 {
latestStatus = *statuses[0].State
}

return OutResponse{
Version: Version{
ID: *request.Params.ID,
Statuses: latestStatus,
ID: *request.Params.ID,
},
Metadata: metadataFromDeployment(deployment, statuses),
}, nil
Expand Down
3 changes: 1 addition & 2 deletions out_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ var _ = Describe("Status Out Command", func() {

Ω(outResponse.Version).Should(Equal(
resource.Version{
ID: "1234",
Statuses: "success",
ID: "1234",
},
))
})
Expand Down
3 changes: 1 addition & 2 deletions resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ type Source struct {
}

type Version struct {
ID string `json:"id"`
Statuses string `json:"status"`
ID string `json:"id"`
}

type CheckRequest struct {
Expand Down