Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH api/users 기능 추가 #8

Merged
merged 3 commits into from
Aug 9, 2023
Merged

Conversation

kMinsAlgorithm
Copy link
Collaborator

PATCH api/users 기능 추가하였습니다.

요청 형식은

query params
roomCode

Body
username
dateOnly
dates

입니다.

Copy link
Member

@ndaemy ndaemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Query Params 건 때문에 Request changes 로 남깁니다 빠샤 💪

src/api/users/users.controller.ts Outdated Show resolved Hide resolved
return this.prismaService.user.findUnique({
where: { username },
});
}

update(id: string, updateUserDto: UpdateUserDto) {
return `This action updates a #${id} user`;
async isDateOnlyFormatValid(dateOnly: boolean, dates: string[]) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 얘는 private method 로 만들면 좋을 것 같고,
  2. private method 는 맨 위든 맨 밑이든 한 쪽으로 몰면 좋을 것 같아요!

@kMinsAlgorithm
Copy link
Collaborator Author

코드 리뷰 기반하여 수정 완료했습니다.
수정 사항은 다음과 같습니다.

  1. Query -> Param
  2. 사용하지 않은 라이브러리 삭제
  3. isDateOnlyFormatValid 함수 private로 지정

Copy link
Member

@ndaemy ndaemy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다 👏

@@ -56,7 +70,7 @@ export class UsersService {
if (badRequestErros.length > 0) {
throw new BadRequestException(badRequestErros);
}

console.log(roomCode);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

나중에 시간 되면 이런 테스트 코드는 삭제시켜주시면 좋을듯!

@kMinsAlgorithm kMinsAlgorithm merged commit 2e7d7c6 into master Aug 9, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants