fix(backend): invert api token check in /auth/warnings/{id}/ack
This commit is contained in:
parent
f608b1046b
commit
c046ae57f2
|
@ -44,7 +44,7 @@ func (s *Server) ackWarning(w http.ResponseWriter, r *http.Request) (err error)
|
|||
ctx := r.Context()
|
||||
claims, _ := server.ClaimsFromContext(ctx)
|
||||
|
||||
if !claims.APIToken {
|
||||
if claims.APIToken {
|
||||
return server.APIError{Code: server.ErrMissingPermissions, Details: "This endpoint cannot be used by API tokens"}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue