use errors.Is
This commit is contained in:
parent
336a9efa46
commit
401689f36c
@ -53,7 +53,7 @@ func (a *JWTAuth) Auth(r *http.Request, usr users.Store, stg *settings.Settings,
|
||||
token.Claims(&payload)
|
||||
|
||||
user, err := usr.Get(srv.Root, payload[a.Claim])
|
||||
if err == errors.ErrNotExist {
|
||||
if errors.Is(err, errors.ErrNotExist) {
|
||||
return nil, os.ErrPermission
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user