Skip to content

Commit

Permalink
🐛 :: fix 500 error
Browse files Browse the repository at this point in the history
  • Loading branch information
gurdl0525 committed Nov 15, 2023
1 parent db56264 commit 288890f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ import org.springframework.stereotype.Repository
interface RefreshTokenRepository : CrudRepository<RefreshToken, String> {

fun findBySub(sub: String): RefreshToken?

fun deleteBySub(sub: String)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class AuthServiceImpl(

val user = userFacade.getCurrentUser()

refreshTokenRepository.deleteBySub(user.sub)
refreshTokenRepository.findBySub(user.sub)?.let {
refreshTokenRepository.delete(it)
}
userRepository.delete(user)
}
}
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spring:
ddl-auto: ${DDL_AUTO:update}
properties:
hibernate:
format_sql: true
format_sql: false
show_sql: true
use_sql_comments: true
open-in-view: false
Expand Down

0 comments on commit 288890f

Please sign in to comment.