mirror of
https://github.com/PretendoNetwork/BOSS.git
synced 2026-10-23 15:54:00 -05:00
Revert "refactor: remove authentication middleware - unneeded and caused eslint to complain"
This reverts commit ab0a6cc151.
This commit is contained in:
11
src/middleware/authentication.ts
Normal file
11
src/middleware/authentication.ts
Normal 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();
|
||||
}
|
||||
Reference in New Issue
Block a user