Skip to content

Commit

Permalink
fix(api): dont send languages in get request body (#1644)
Browse files Browse the repository at this point in the history
  • Loading branch information
gotbadger authored Jun 26, 2024
1 parent 615942c commit 1481ae0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion api/version.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
package api

import "net/url"

func (api *API) Version(languages []string) ([]byte, error) {
endpoint := Endpoints.Version
response, err := api.makeRequest(endpoint.Route, endpoint.HttpMethod, languages)
languageQuery := url.Values{}
for _, lang := range languages {
languageQuery.Add("_json[]", lang)
}
response, err := api.makeRequest(endpoint.Route+languageQuery.Encode(), endpoint.HttpMethod, nil)

return response, err
}

0 comments on commit 1481ae0

Please sign in to comment.