Fix api endpoint log message

This commit is contained in:
Daniel 2022-11-04 16:10:25 +01:00
parent 985a174aff
commit b0e5bc90c2

View file

@ -388,18 +388,18 @@ func (e *Endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if eMethod != e.ReadMethod {
log.Tracer(r.Context()).Warningf(
"api: method %q does not match required read method %q%s",
" - this will be an error and abort the request in the future",
r.Method,
e.ReadMethod,
" - this will be an error and abort the request in the future",
)
}
} else {
if eMethod != e.WriteMethod {
log.Tracer(r.Context()).Warningf(
"api: method %q does not match required write method %q%s",
" - this will be an error and abort the request in the future",
r.Method,
e.ReadMethod,
e.WriteMethod,
" - this will be an error and abort the request in the future",
)
}
}