fix(backend): invert api token check in /auth/warnings/{id}/ack

This commit is contained in:
sam 2023-07-27 00:55:51 +02:00
parent f608b1046b
commit c046ae57f2
No known key found for this signature in database
GPG Key ID: B4EF20DDE721CAA1
1 changed files with 1 additions and 1 deletions

View File

@ -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"}
}