Skip to content

Commit

Permalink
Merge pull request #48 from statsig-io/fix-download-config-spec-data
Browse files Browse the repository at this point in the history
fix typing in download config spec data
  • Loading branch information
jkw-statsig authored Oct 25, 2021
2 parents c056988 + 00092a1 commit b9441d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions store.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package statsig

import (
"encoding/json"
"strconv"
"time"
)

Expand Down Expand Up @@ -40,7 +39,7 @@ type downloadConfigSpecResponse struct {
}

type downloadConfigsInput struct {
SinceTime string `json:"sinceTime"`
SinceTime int64 `json:"sinceTime"`
StatsigMetadata statsigMetadata `json:"statsigMetadata"`
}

Expand Down Expand Up @@ -89,7 +88,7 @@ func (s *store) update(specs downloadConfigSpecResponse) {

func (s *store) fetchConfigSpecs() downloadConfigSpecResponse {
input := &downloadConfigsInput{
SinceTime: strconv.FormatInt(s.lastSyncTime, 10),
SinceTime: s.lastSyncTime,
StatsigMetadata: s.transport.metadata,
}
var specs downloadConfigSpecResponse
Expand Down
2 changes: 1 addition & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func newTransport(secret string, api string) *transport {

return &transport{
api: api,
metadata: statsigMetadata{SDKType: "go-sdk", SDKVersion: "v1.0.0"},
metadata: statsigMetadata{SDKType: "go-sdk", SDKVersion: "v1.0.1"},
sdkKey: secret,
client: &http.Client{},
}
Expand Down

0 comments on commit b9441d0

Please sign in to comment.