Skip to content

Commit

Permalink
DRAW-443 refactor: 코드 리뷰 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
SunwoongH committed Nov 11, 2024
1 parent cdcc19a commit 77243be
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal interface AuthUserJpaRepository : JpaRepository<AuthUserJpaEntity, Long
@Modifying
@Query(
"delete from AuthUserJpaEntity au " +
"where au.user = :userId",
"where au.user.id = :userId",
)
fun deleteAllByUserId(@Param(value = "userId") userId: Long)
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.xorker.draw.auth.token

import org.springframework.data.jpa.repository.JpaRepository
import org.springframework.data.jpa.repository.Modifying

internal interface RefreshTokenJpaRepository : JpaRepository<RefreshTokenJpaEntity, ByteArray> {
@Modifying
fun deleteByUserId(userId: Long)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ internal class UserAdapter(
private val userJpaRepository: UserJpaRepository,
private val authUserJpaRepository: AuthUserJpaRepository,
) : UserRepository {

override fun getUser(platform: AuthPlatform, platformUserId: String): UserInfo? =
authUserJpaRepository.find(platform, platformUserId)?.user?.toDomain()

Expand Down

0 comments on commit 77243be

Please sign in to comment.