Skip to content

Commit

Permalink
list: sort time entries ascending (last line printed out is newest)
Browse files Browse the repository at this point in the history
  • Loading branch information
phiros committed Apr 1, 2019
1 parent 6fb1b5b commit 1b77dd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func apiGetEntries() (timeEntries []TimeEntry) {

toDate := time.Now().Format("2006-01-02")
fromDate := time.Now().AddDate(0, 0, -7).Format("2006-01-02")
requestPathAndParams := fmt.Sprintf("/time_entries.json?from=%s&to=%s", fromDate, toDate)
requestPathAndParams := fmt.Sprintf("/time_entries.json?from=%s&to=%s&direction=asc", fromDate, toDate)
req := buildGetRequest(requestPathAndParams)
res, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit 1b77dd7

Please sign in to comment.