fix: 유저 행동 기록, 포인트 지급

- 포인트 지급 완료시 푸시 보내지 않도록 수정
This commit is contained in:
2025-05-26 19:22:42 +09:00
parent caee89cf53
commit e049e0fa3c
5 changed files with 10 additions and 54 deletions

View File

@@ -66,12 +66,7 @@ class MemberController(
userActionService.recordAction(
memberId = response.memberId,
isAuth = false,
actionType = ActionType.SIGN_UP,
pushTokenList = if (request.pushToken != null) {
listOf(request.pushToken)
} else {
emptyList()
}
actionType = ActionType.SIGN_UP
)
return ApiResponse.ok(message = "회원가입을 축하드립니다.", data = response.loginResponse)
@@ -360,12 +355,7 @@ class MemberController(
userActionService.recordAction(
memberId = response.memberId,
isAuth = false,
actionType = ActionType.SIGN_UP,
pushTokenList = if (request.pushToken != null) {
listOf(request.pushToken)
} else {
emptyList()
}
actionType = ActionType.SIGN_UP
)
}
@@ -396,12 +386,7 @@ class MemberController(
userActionService.recordAction(
memberId = response.memberId,
isAuth = false,
actionType = ActionType.SIGN_UP,
pushTokenList = if (request.pushToken != null) {
listOf(request.pushToken)
} else {
emptyList()
}
actionType = ActionType.SIGN_UP
)
}

View File

@@ -3,7 +3,6 @@ package kr.co.vividnext.sodalive.member.auth
import kr.co.vividnext.sodalive.common.ApiResponse
import kr.co.vividnext.sodalive.common.SodaException
import kr.co.vividnext.sodalive.member.Member
import kr.co.vividnext.sodalive.member.MemberService
import kr.co.vividnext.sodalive.useraction.ActionType
import kr.co.vividnext.sodalive.useraction.UserActionService
import org.springframework.security.core.annotation.AuthenticationPrincipal
@@ -16,7 +15,6 @@ import org.springframework.web.bind.annotation.RestController
@RequestMapping("/auth")
class AuthController(
private val service: AuthService,
private val memberService: MemberService,
private val userActionService: UserActionService
) {
@PostMapping
@@ -36,13 +34,10 @@ class AuthController(
val authResponse = service.authenticate(authenticateData, member.id!!)
try {
val memberId = member.id!!
val pushTokenList = memberService.getPushTokenList(recipient = memberId)
userActionService.recordAction(
memberId = member.id!!,
isAuth = true,
actionType = ActionType.USER_AUTHENTICATION,
pushTokenList = pushTokenList
actionType = ActionType.USER_AUTHENTICATION
)
} catch (_: Exception) {
}