diff --git a/packages/backend/src/helpers/authentication.js b/packages/backend/src/helpers/authentication.js index ac7c3426..cfbb20d4 100644 --- a/packages/backend/src/helpers/authentication.js +++ b/packages/backend/src/helpers/authentication.js @@ -1,7 +1,7 @@ import User from '../models/user.js'; import AccessToken from '../models/access-token.js'; -export const isAuthenticated = async (_parent, _args, req) => { +export const isAuthenticated = async (req) => { const token = req.headers['authorization']; if (token == null) return false; @@ -40,7 +40,7 @@ export const isAuthenticated = async (_parent, _args, req) => { }; export const authenticateUser = async (request, response, next) => { - if (await isAuthenticated(null, null, request)) { + if (await isAuthenticated(request)) { next(); } else { return response.status(401).end();