Skip to content

Commit

Permalink
return files/artifacts with build
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed Jul 26, 2017
1 parent 99b1053 commit 825dc63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions model/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type Build struct {
Reviewer string `json:"reviewed_by" meddler:"build_reviewer"`
Reviewed int64 `json:"reviewed_at" meddler:"build_reviewed"`
Procs []*Proc `json:"procs,omitempty" meddler:"-"`
Files []*File `json:"files,omitempty" meddler:"-"`
}

// Trim trims string values that would otherwise exceed
Expand Down
2 changes: 2 additions & 0 deletions server/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ func GetBuild(c *gin.Context) {
c.AbortWithError(http.StatusInternalServerError, err)
return
}
files, _ := store.FromContext(c).FileList(build)
procs, _ := store.FromContext(c).ProcList(build)
build.Procs = model.Tree(procs)
build.Files = files

c.JSON(http.StatusOK, build)
}
Expand Down

0 comments on commit 825dc63

Please sign in to comment.