Skip to content

Commit de5d1ff

Browse files
authored
Merge pull request #91 from aidenwallis/fix-api-responses
adds template field to api response
2 parents 7328a88 + fa066b0 commit de5d1ff

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

internal/api/api.go

+2
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ func NewRequest(method string, path string, queryParameters []string, body []byt
101101
return
102102
}
103103

104+
data.Template = apiResponse.Template
105+
104106
if resp.StatusCode > 299 || resp.StatusCode < 200 {
105107
data = apiResponse
106108
break

internal/models/api.go

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ type APIResponse struct {
88
Error string `json:"error,omitempty"`
99
Status int `json:"status,omitempty"`
1010
Message string `json:"message,omitempty"`
11+
Template string `json:"template,omitempty"`
1112
Total *int `json:"total,omitempty"`
1213
DateRange *BitsLeaderboardDateRange `json:"date_range,omitempty"`
1314
}

0 commit comments

Comments
 (0)