app/src/middleware/authentication.ts
Showing 2 of 2 total issues
Function currentUser
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
Open
export const currentUser = async (req: Request, res: Response, next: NextFunction) => { const authorization = req.get('Authorization'); const currentUser: CurrentUser = { authType: AuthType.NONE, tokenPayload: null
- Read upRead up
Function currentUser
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const currentUser = async (req: Request, res: Response, next: NextFunction) => { const authorization = req.get('Authorization'); const currentUser: CurrentUser = { authType: AuthType.NONE, tokenPayload: null