refactor checkToken

This commit is contained in:
Madeline
2023-07-28 09:26:18 +10:00
parent 8a3989c297
commit f1f68c3d31
8 changed files with 11001 additions and 8202 deletions
+1 -6
View File
@@ -92,12 +92,7 @@ export async function Authentication(
Sentry.setUser({ id: req.user_id });
try {
const { jwtSecret } = Config.get().security;
const { decoded, user } = await checkToken(
req.headers.authorization,
jwtSecret,
);
const { decoded, user } = await checkToken(req.headers.authorization);
req.token = decoded;
req.user_id = decoded.id;