Skip to content

Conversation

kimyu0218
Copy link
Collaborator

@kimyu0218 kimyu0218 commented Jan 20, 2024

변경 사항

  • 변수명, 파라미터명을 직관적으로 변경하는 과정에서 일부만 수정하여 유효성 검사 에러 발생
  • :id -> :cardNo 로 변경하여 일치하도록 수정

고민과 해결 과정

- @Get('card/:id')
+ @Get('card/:cardNo')
@FindTarotCardDecorator(
  '타로 카드 이미지',
  { type: 'integer', name: 'cardNo' },
  TarotCardDto,
)
async findTarotCardByCardNo(
  @Param('cardNo', ParseIntPipe) cardNo: number,
): Promise<TarotCardDto> {
  return await this.tarotService.findTarotCardByCardNo(cardNo);
}

(선택) 테스트 결과

- 변수명, 파라미터명을 직관적으로 변경하는 과정에서 일부만 수정하여
  유효성 검사 에러 발생
- :id -> :cardNo 로 변경하여 일치하도록 수정
@kimyu0218 kimyu0218 added this to the version 1.0.0 milestone Jan 20, 2024
@kimyu0218 kimyu0218 self-assigned this Jan 20, 2024
@kimyu0218 kimyu0218 linked an issue Jan 20, 2024 that may be closed by this pull request
@kimyu0218 kimyu0218 merged commit 01ecc66 into dev Jan 20, 2024
@kimyu0218 kimyu0218 deleted the BE/bugfix/#485-findTarotCardByCardNo branch January 20, 2024 09:06
@HeoJiye HeoJiye mentioned this pull request Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐞 findTarotCardByCardNo 유효성 검사 실패
1 participant