chore: strengthen backend eslint profile

This commit is contained in:
2026-09-28 16:37:01 +03:00
committed by ksv741
parent 53b2794963
commit a970eaaf7a
179 changed files with 4485 additions and 2716 deletions
@@ -2,6 +2,7 @@ import { Injectable, UnauthorizedException } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PassportStrategy } from '@nestjs/passport';
import { ExtractJwt, Strategy } from 'passport-jwt';
import { Environment } from '../../../config/env.validation';
import { AccessPayload } from '../application/auth.types';
@@ -17,8 +18,9 @@ export class JwtStrategy extends PassportStrategy(Strategy) {
}
validate(payload: AccessPayload): AccessPayload {
if (payload.type !== 'access')
if (payload.type !== 'access') {
throw new UnauthorizedException({ code: 'UNAUTHORIZED' });
}
return payload;
}
}