Expose ViewTicket as per FindIssues

This allows external users of the API to retreive issue details, in the same
manner that FindIssues provides for lists of issues.
This commit is contained in:
Mike Pountney
2015-12-31 12:06:04 -08:00
parent da6cbd5021
commit 8977f3dd9b
2 changed files with 11 additions and 3 deletions
+1 -3
View File
@@ -80,12 +80,10 @@ func (c *Cli) CmdList() error {
func (c *Cli) CmdView(issue string) error {
log.Debug("view called")
c.Browse(issue)
uri := fmt.Sprintf("%s/rest/api/2/issue/%s", c.endpoint, issue)
data, err := responseToJson(c.get(uri))
data, err := c.ViewIssue(issue)
if err != nil {
return err
}
return runTemplate(c.getTemplate("view"), data, nil)
}