Use req.user to check auth instead of req.is_auth
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

master ci-04
Garrett Mills 4 years ago
parent efdea10b14
commit fd06e17d7d
Signed by: garrettmills
GPG Key ID: D2BF5FBA8298F246

@ -7,7 +7,7 @@ class APIRouteMiddleware extends Middleware {
async test(req, res, next, { allow_token = true, allow_user = true }) {
// First, check if there is a user in the session.
if ( allow_user && req.is_auth ) {
if ( allow_user && req.user ) {
return next()
} else if ( allow_token ) {
if ( !req.oauth ) req.oauth = {}

Loading…
Cancel
Save