-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
src/api/rooms/rooms.service.ts
Outdated
async getRoomInfo(code: string): Promise<boolean> { | ||
const roomInfo = await this.prismaService.room.findUnique({ | ||
where: { code }, | ||
}); | ||
//만약 방이 없다면 예외처리를 어떻게 해야 할까요?? | ||
const dateOnly = roomInfo.dateOnly; | ||
return dateOnly; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이건 이미 존재하는 findOne 을 써도 괜찮았을 것 같은데, 별도로 선언한 특별한 이유가 있는건가요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?????????? 그렇네요???????
findone으로 사용하는걸로 수정할게용
src/api/users/users.service.ts
Outdated
@@ -95,14 +86,17 @@ export class UsersService { | |||
return token; | |||
} | |||
|
|||
async update(roomCode: string, updateUserDto: UpdateUserDto) { | |||
async update( | |||
userInfoFromTk: User, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거 네이밍은 아예 줄이거나 아예 늘리거나 하면 좋을 것 같아요! 한 번에 무슨 뜻인지 잘 와닿지 않아서요!
- user
- userInfoFromToken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 알겠습니다
아 그리고 PR 이름도 바꿔주세요! |
다시 재수정 했습니다. 확인 부탁드립니당 @ndaemy |
https://mjulikelion11th.slack.com/archives/C053JFTFV5J/p1692633946592789
이 피드백 토대로 수정 완료 했습니다.
dateOnly는 DB를 통해, username은 토큰을 통해 받아오도록 수정했습니다.