From aa4cd39c943b67169def224e224bd07b815b70ec Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 31 Oct 2024 09:29:04 -0700 Subject: biome lint --- lib/auth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/auth.ts') diff --git a/lib/auth.ts b/lib/auth.ts index 0a8d43d3..29edcf61 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -8,7 +8,7 @@ export const admin = { preValidation: fastifyPassport.authenticate( "jwt", { session: false }, - function (req, res, err, user, info) { + (req, res, err, user, info) => { if (!user.admin) return res.code(401).send("unauthorized"); req.user = user; }, @@ -19,7 +19,7 @@ export const optional = { preValidation: fastifyPassport.authenticate( "jwt", { session: false }, - function (req, res, err, user, info) { + (req, res, err, user, info) => { req.user = user; }, ), @@ -45,7 +45,7 @@ export const jwtStrategy = new jwt.Strategy( secretOrKey: config.jwt, }, async (payload, next) => { - let user = await getUser(payload.id); + const user = await getUser(payload.id); next(null, user); }, ); -- cgit v1.2.3