fixed linter error

This commit is contained in:
Annika Hannig 2021-10-15 12:03:16 +02:00
parent d27b0dca20
commit 45b0395f2e

View File

@ -44,13 +44,13 @@ func endpoint(wrapped apiEndpoint) httprouter.Handle {
result, err := wrapped(req, params)
if err != nil {
// Get affected rs id
rsId, paramErr := validateSourceID(params.ByName("id"))
rsID, paramErr := validateSourceID(params.ByName("id"))
if paramErr != nil {
rsId = "unknown"
rsID = "unknown"
}
// Make error response
result, status := apiErrorResponse(rsId, err)
result, status := apiErrorResponse(rsID, err)
payload, _ := json.Marshal(result)
http.Error(res, string(payload), status)
return