Skip to content

Commit

Permalink
Implemented feedback from @xvello
Browse files Browse the repository at this point in the history
  • Loading branch information
sendqueery committed Jan 6, 2020
1 parent eebaff0 commit 1b59a2b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion log_lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type QueryTime struct {
TimeFrom *string `json:"from"`
TimeTo *string `json:"to"`
TimeZone *string `json:"timezone,omitempty"`
Offset *int `json:"offset,omitempty"`
}

// LogsList represents the base API response returned by the list API
Expand Down Expand Up @@ -74,7 +75,7 @@ func (client *Client) GetLogsListPages(logsRequest *LogsListRequest) (logs []Log

response, err := client.GetLogsList(logsRequest)
if err != nil {
return response.Logs, err
return nil, err
}

logs = append(logs, response.Logs...)
Expand Down
2 changes: 2 additions & 0 deletions log_lists_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ func TestGetLogsListPages(t *testing.T) {
assert.Nil(err)
w.Write(response)
} else {
assert.Equal(*responseBody.StartAt, "BBBBBWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA")

response, err := ioutil.ReadFile("./tests/fixtures/logs/loglist_page_response.json")

assert.Nil(err)
Expand Down

0 comments on commit 1b59a2b

Please sign in to comment.