Skip to content

Conversation

@daeguhighman
Copy link

.

@daeguhighman daeguhighman changed the title feat:week0 과제 구현 윤동현 seminar0 과제 Sep 18, 2023
Copy link
Member

@PFCJeong PFCJeong left a comment

Choose a reason for hiding this comment

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

수고하셨습니다~

TODO()
val token = webRequest
.getHeader("Authorization")
?.removePrefix("Bearer ") ?: throw AuthenticateException()
Copy link
Member

Choose a reason for hiding this comment

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

Bearer로 시작하지 않는 경우 불필요하게 인증 로직을 타겠네요. 근데 생각해보니 저도 이렇게 짰던 것 같네요..ㅎㅎ

@ExceptionHandler
fun handleException(e: UserException): ResponseEntity<Unit> {
TODO()
return when (e) {
Copy link
Member

Choose a reason for hiding this comment

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

중복 코드를 조금 줄일 수 있을 것 같습니다.

val status: Int = when(e) {
...
}

return ResponseEntity.status(status).build()

@PFCJeong PFCJeong force-pushed the master branch 2 times, most recently from 1a8e813 to f420cff Compare October 3, 2023 16:42
@PFCJeong PFCJeong force-pushed the master branch 3 times, most recently from 633df04 to 66e14db Compare October 22, 2023 00:28
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