This commit is contained in:
Sam 2022-05-14 21:57:44 +02:00
parent 85754a9208
commit 020ac15a00

View file

@ -19,10 +19,10 @@ func (s *Server) maybeAuth(next http.Handler) http.Handler {
claims, err := s.Auth.Claims(token) claims, err := s.Auth.Claims(token)
if err != nil { if err != nil {
render.Status(r, errCodeStatuses[ErrForbidden]) render.Status(r, errCodeStatuses[ErrInvalidToken])
render.JSON(w, r, APIError{ render.JSON(w, r, APIError{
Code: ErrForbidden, Code: ErrInvalidToken,
Message: errCodeMessages[ErrForbidden], Message: errCodeMessages[ErrInvalidToken],
}) })
return return
} }