Skip to content

Commit

Permalink
fix: id의 유효성 검사 데코레이터를 IsNumber에서 IsInt로 변경
Browse files Browse the repository at this point in the history
 IsNumber 데코레이터는 소수또한 유효하게 처리하기 때문에 Id 프로퍼티의 유효성 검사 데코레이터를 IsInt로 변경
  • Loading branch information
choyoungwoo9 committed Jul 6, 2024
1 parent 5dd1c4b commit 9536305
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions backend/src/project/dto/epic/EpicDeleteRequest.dto.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Type } from 'class-transformer';
import { IsNotEmpty, IsNumber, Matches, ValidateNested } from 'class-validator';
import { IsInt, IsNotEmpty, Matches, ValidateNested } from 'class-validator';

class Epic {
@IsNumber()
@IsInt()
id: number;
}

Expand Down
4 changes: 2 additions & 2 deletions backend/src/project/dto/epic/EpicUpdateRequest.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Type } from 'class-transformer';
import {
IsEnum,
IsNotEmpty,
IsNumber,
IsInt,
IsOptional,
IsString,
Matches,
Expand All @@ -12,7 +12,7 @@ import { EpicColor } from 'src/project/entity/epic.entity';

class Epic {
@IsNotEmpty()
@IsNumber()
@IsInt()
id: number;

@IsOptional()
Expand Down
4 changes: 2 additions & 2 deletions backend/src/project/dto/link/LinkDeleteRequest.dto.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Type } from 'class-transformer';
import { IsNotEmpty, IsNumber, Matches, ValidateNested } from 'class-validator';
import { IsNotEmpty, IsInt, Matches, ValidateNested } from 'class-validator';

class Link {
@IsNumber()
@IsInt()
id: number;
}

Expand Down
4 changes: 2 additions & 2 deletions backend/src/project/dto/member/MemberUpdateRequest.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Type } from 'class-transformer';
import {
IsEnum,
IsNotEmpty,
IsNumber,
IsInt,
IsOptional,
IsString,
Matches,
Expand All @@ -11,7 +11,7 @@ import {
import { MemberStatus } from '../../enum/MemberStatus.enum';

class Content {
@IsNumber()
@IsInt()
id: number;

@IsString()
Expand Down
4 changes: 2 additions & 2 deletions backend/src/project/dto/memo/MemoColorUpdateRequest.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { Type } from 'class-transformer';
import {
IsEnum,
IsNotEmpty,
IsNumber,
IsInt,
Matches,
ValidateNested,
} from 'class-validator';
import { memoColor } from '../../entity/memo.entity';

class Content {
@IsNumber()
@IsInt()
id: number;

@IsEnum(memoColor)
Expand Down
4 changes: 2 additions & 2 deletions backend/src/project/dto/memo/MemoDeleteRequest.dto.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Type } from 'class-transformer';
import { IsNotEmpty, IsNumber, Matches, ValidateNested } from 'class-validator';
import { IsNotEmpty, IsInt, Matches, ValidateNested } from 'class-validator';

class MemoId {
@IsNumber()
@IsInt()
id: number;
}

Expand Down

0 comments on commit 9536305

Please sign in to comment.