refactor: centralize domain values and enforce numeric lint

This commit is contained in:
2026-09-13 14:37:39 +03:00
parent 8ba005346d
commit 8637ad2f34
44 changed files with 543 additions and 174 deletions
@@ -4,6 +4,7 @@ import {
Delete,
Get,
HttpCode,
HttpStatus,
Put,
Req,
UseGuards,
@@ -47,7 +48,7 @@ export class TbankConnectionController {
}
@Delete()
@HttpCode(204)
@HttpCode(HttpStatus.NO_CONTENT)
@ApiNoContentResponse()
delete(@Req() request: Request & { user: AccessPayload }): Promise<void> {
return this.connection.delete(request.user.sub);
@@ -1,11 +1,13 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
const MAX_TOKEN_LENGTH = 4096;
export class PutTbankConnectionDto {
@ApiProperty({ writeOnly: true })
@IsString()
@IsNotEmpty()
@MaxLength(4096)
@MaxLength(MAX_TOKEN_LENGTH)
declare token: string;
}