Revert "refactor: remove authentication middleware - unneeded and caused eslint to complain"

This reverts commit ab0a6cc151.
This commit is contained in:
William Oldham
2025-01-08 19:05:47 +00:00
parent 9bebbe6e05
commit eb2585d33b
4 changed files with 25 additions and 13 deletions

View File

@@ -0,0 +1,11 @@
import { getNEXDataByPID } from '@/util';
import type express from 'express';
export default async function authenticationMiddleware(request: express.Request, response: express.Response, next: express.NextFunction): Promise<void> {
if (request.pid) {
// TODO - Get users PNIDs
request.nexAccount = await getNEXDataByPID(request.pid);
}
return next();
}