From 3d10fb888a0a9cb7940662d3485a44b5b3d53fab Mon Sep 17 00:00:00 2001 From: gotbadger Date: Wed, 26 Jun 2024 12:37:45 +0100 Subject: [PATCH] fix(api): dont send languages in get request body --- api/version.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/version.go b/api/version.go index 67d2dc913..6f88246d6 100644 --- a/api/version.go +++ b/api/version.go @@ -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 }