This commit is contained in:
Sam 2022-05-14 21:57:44 +02:00
parent 85754a9208
commit 020ac15a00
1 changed files with 3 additions and 3 deletions

View File

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