fix(api): resolve 2 TypeScript compile errors
- Use bracket notation for process.env['BCRYPT_ROUNDS'] index signature access - Remove redundant route? property from AuthenticatedRequest interface that conflicted with Express Request's required route property Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -7,7 +7,7 @@ interface HashedPasswordProps {
|
|||||||
|
|
||||||
export class HashedPassword extends ValueObject<HashedPasswordProps> {
|
export class HashedPassword extends ValueObject<HashedPasswordProps> {
|
||||||
private static readonly SALT_ROUNDS = parseInt(
|
private static readonly SALT_ROUNDS = parseInt(
|
||||||
process.env.BCRYPT_ROUNDS ?? '12',
|
process.env['BCRYPT_ROUNDS'] ?? '12',
|
||||||
10,
|
10,
|
||||||
);
|
);
|
||||||
private static readonly MIN_LENGTH = 8;
|
private static readonly MIN_LENGTH = 8;
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import { type RedisService } from '../redis.service';
|
|||||||
/** Express request extended with optional JWT user payload. */
|
/** Express request extended with optional JWT user payload. */
|
||||||
interface AuthenticatedRequest extends Request {
|
interface AuthenticatedRequest extends Request {
|
||||||
user?: { sub: string; role: string };
|
user?: { sub: string; role: string };
|
||||||
route?: { path: string };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user