feat: 유저 행동 데이터 - 본인인증 추가
This commit is contained in:
		| @@ -3,6 +3,8 @@ 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.useraction.ActionType | ||||
| import kr.co.vividnext.sodalive.useraction.UserActionService | ||||
| import org.springframework.security.core.annotation.AuthenticationPrincipal | ||||
| import org.springframework.web.bind.annotation.PostMapping | ||||
| import org.springframework.web.bind.annotation.RequestBody | ||||
| @@ -11,7 +13,10 @@ import org.springframework.web.bind.annotation.RestController | ||||
|  | ||||
| @RestController | ||||
| @RequestMapping("/auth") | ||||
| class AuthController(private val service: AuthService) { | ||||
| class AuthController( | ||||
|     private val service: AuthService, | ||||
|     private val userActionService: UserActionService | ||||
| ) { | ||||
|     @PostMapping | ||||
|     fun authVerify( | ||||
|         @RequestBody request: AuthVerifyRequest, | ||||
| @@ -26,6 +31,12 @@ class AuthController(private val service: AuthService) { | ||||
|             throw SodaException("운영정책을 위반하여 이용을 제한합니다.") | ||||
|         } | ||||
|  | ||||
|         userActionService.recordAction( | ||||
|             memberId = member.id!!, | ||||
|             actionType = ActionType.USER_AUTHENTICATION, | ||||
|             pushToken = member.pushToken | ||||
|         ) | ||||
|  | ||||
|         ApiResponse.ok(service.authenticate(authenticateData, member.id!!)) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,5 +1,6 @@ | ||||
| package kr.co.vividnext.sodalive.useraction | ||||
|  | ||||
| enum class ActionType(val displayName: String) { | ||||
|     SIGN_UP("회원가입") | ||||
|     SIGN_UP("회원가입"), | ||||
|     USER_AUTHENTICATION("본인인증") | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user