Fix the wcloud client

This commit is contained in:
Tom Wilkie
2016-07-18 15:43:43 +01:00
parent 3925eb67fc
commit f2f4e5bff7
2 changed files with 3 additions and 3 deletions

View File

@@ -92,7 +92,7 @@ func list(c Client, args []string) {
}
through := time.Now()
from := through.Add(-*since)
deployments, err := c.GetDeployments(through.Unix(), from.Unix())
deployments, err := c.GetDeployments(from.Unix(), through.Unix())
if err != nil {
fmt.Println(err.Error())
os.Exit(1)
@@ -125,7 +125,7 @@ func events(c Client, args []string) {
}
through := time.Now()
from := through.Add(-*since)
events, err := c.GetEvents(through.Unix(), from.Unix())
events, err := c.GetEvents(from.Unix(), through.Unix())
if err != nil {
fmt.Println(err.Error())
os.Exit(1)

View File

@@ -76,7 +76,7 @@ func (c Client) GetDeployments(from, through int64) ([]Deployment, error) {
// GetEvents returns the raw events.
func (c Client) GetEvents(from, through int64) ([]byte, error) {
req, err := c.newRequest("GET", fmt.Sprintf("/api/deploy/from=%d&through=%d", from, through), nil)
req, err := c.newRequest("GET", fmt.Sprintf("/api/deploy/events?from=%d&through=%d", from, through), nil)
if err != nil {
return nil, err
}