Skip to content

Week 0 과제 재업로드#36

Open
vitacpark wants to merge 2 commits intowafflestudio:masterfrom
vitacpark:master
Open

Week 0 과제 재업로드#36
vitacpark wants to merge 2 commits intowafflestudio:masterfrom
vitacpark:master

Conversation

@vitacpark
Copy link

No description provided.

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.

수고하셨습니다~

fun handleException(e: UserException): ResponseEntity<Unit> {
TODO()
return when(e){
is AuthenticateException -> ResponseEntity(HttpStatus.UNAUTHORIZED)
Copy link
Member

Choose a reason for hiding this comment

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

합칠 수 있는 것들은 합치면 좋을 것 같습니다.

return User(username = username,image=image)
}

override fun signIn(username: String, password: String): User {
Copy link
Member

Choose a reason for hiding this comment

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

로그인 성공 시나리오에서 db 조회가 3번 일어나게 됩니다.

한번만 조회해도 좋을 것 같습니다.


override fun authenticate(accessToken: String): User {
TODO("Not yet implemented")
val users = userRepository.findAll().map{User(it.username,it.image)}
Copy link
Member

Choose a reason for hiding this comment

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

원래는 findByUsername(accessToken.reversed())를 의도하였습니다., 이 로직은 억지로 들어간 측면이 있긴 합니다.

@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