Skip to content

Commit

Permalink
Merge pull request #7 from nsteinmetz/patch-1
Browse files Browse the repository at this point in the history
fix: Delete param is end, not stop & start/end are expects timestamps
  • Loading branch information
miton18 authored Jul 6, 2021
2 parents 1a19238 + 3e6f401 commit d257bfe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions base/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"net/http"
"strings"
"time"
"strconv"
)

// Exec execute a WarpScript on the backend, returning resultat as byte array
Expand Down Expand Up @@ -194,8 +195,8 @@ func (c *Client) Delete(selector Selector, start time.Time, stop time.Time) ([]b
if start.IsZero() && stop.IsZero() {
q.Add("deleteall", "")
} else {
q.Add("start", start.UTC().Format(time.RFC3339Nano))
q.Add("stop", stop.UTC().Format(time.RFC3339Nano))
q.Add("start", strconv.FormatInt(start.UnixNano()/1000, 10))
q.Add("end", strconv.FormatInt(stop.UnixNano()/1000, 10))
}
req.URL.RawQuery = q.Encode()

Expand Down

0 comments on commit d257bfe

Please sign in to comment.