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

dateOnly, username 요청값으로 받아오지 않도록 수정 #13

Merged
merged 2 commits into from
Aug 25, 2023

Conversation

kMinsAlgorithm
Copy link
Collaborator

https://mjulikelion11th.slack.com/archives/C053JFTFV5J/p1692633946592789
이 피드백 토대로 수정 완료 했습니다.

dateOnly는 DB를 통해, username은 토큰을 통해 받아오도록 수정했습니다.

Comment on lines 24 to 32
async getRoomInfo(code: string): Promise<boolean> {
const roomInfo = await this.prismaService.room.findUnique({
where: { code },
});
//만약 방이 없다면 예외처리를 어떻게 해야 할까요??
const dateOnly = roomInfo.dateOnly;
return dateOnly;
}

Copy link
Member

Choose a reason for hiding this comment

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

이건 이미 존재하는 findOne 을 써도 괜찮았을 것 같은데, 별도로 선언한 특별한 이유가 있는건가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

?????????? 그렇네요???????
findone으로 사용하는걸로 수정할게용

@@ -95,14 +86,17 @@ export class UsersService {
return token;
}

async update(roomCode: string, updateUserDto: UpdateUserDto) {
async update(
userInfoFromTk: User,
Copy link
Member

Choose a reason for hiding this comment

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

요거 네이밍은 아예 줄이거나 아예 늘리거나 하면 좋을 것 같아요! 한 번에 무슨 뜻인지 잘 와닿지 않아서요!

  • user
  • userInfoFromToken

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵 알겠습니다

@ndaemy
Copy link
Member

ndaemy commented Aug 23, 2023

아 그리고 PR 이름도 바꿔주세요!

@kMinsAlgorithm kMinsAlgorithm changed the title fix: dateOnly, username 요청값으로 받아오지 않도록 수정 dateOnly, username 요청값으로 받아오지 않도록 수정 Aug 24, 2023
@kMinsAlgorithm
Copy link
Collaborator Author

다시 재수정 했습니다. 확인 부탁드립니당 @ndaemy

@kMinsAlgorithm kMinsAlgorithm merged commit b79a0c0 into master Aug 25, 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