mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
Fix the wcloud client
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user