Skip to content

Commit

Permalink
Return unit in API requests per default
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTheBear committed Aug 22, 2023
1 parent 997dd8f commit 3f3a150
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 @@ -208,7 +208,7 @@ type ApiQuery struct {

func handleQuery(rw http.ResponseWriter, r *http.Request) {
var err error
var req ApiQueryRequest = ApiQueryRequest{WithStats: true, WithData: true, WithPadding: true}
var req ApiQueryRequest = ApiQueryRequest{WithStats: true, WithData: true, WithPadding: true, WithUnit: true}
if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
http.Error(rw, err.Error(), http.StatusBadRequest)
return
Expand Down

0 comments on commit 3f3a150

Please sign in to comment.