From f2f4e5bff7e0ebc8326ba0e4fb5fd516e23c635f Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Mon, 18 Jul 2016 15:43:43 +0100 Subject: [PATCH] Fix the wcloud client --- cmd/wcloud/cli.go | 4 ++-- cmd/wcloud/client.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/wcloud/cli.go b/cmd/wcloud/cli.go index 377d5ced35..cd11bd30f1 100644 --- a/cmd/wcloud/cli.go +++ b/cmd/wcloud/cli.go @@ -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) diff --git a/cmd/wcloud/client.go b/cmd/wcloud/client.go index b8562425c2..d53b155892 100644 --- a/cmd/wcloud/client.go +++ b/cmd/wcloud/client.go @@ -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 }