api4/license: Return 400 instead of 501 if format is not passed (#19856)

```release-note
NONE
```


Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Agniva De Sarker
2022-04-04 10:27:29 +05:30
коммит произвёл GitHub
родитель 326daf1334
Коммит 1cc50ff90c
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@@ -31,7 +31,7 @@ func getClientLicense(c *Context, w http.ResponseWriter, r *http.Request) {
format := r.URL.Query().Get("format")
if format == "" {
c.Err = model.NewAppError("getClientLicense", "api.license.client.old_format.app_error", nil, "", http.StatusNotImplemented)
c.Err = model.NewAppError("getClientLicense", "api.license.client.old_format.app_error", nil, "", http.StatusBadRequest)
return
}