Skip to content

Commit

Permalink
fix: "헬스장 인증 임시 변경"
Browse files Browse the repository at this point in the history
  • Loading branch information
seonwoo-jung committed Jun 9, 2024
1 parent fbfef73 commit 629ef69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class GymCommandService(
return CommandRegisterGymResult.from(gym)
}

fun selectMyGym(gymId: Long, request: CommandSelectMyGym, memberId: Long): CommandSelectMyGymResult {
fun selectMyGym(gymId: Long, request: CommandSelectMyGym?, memberId: Long): CommandSelectMyGymResult {

val member = memberRepository.findByIdOrNull(memberId)
?: throw CustomException(MEMBER_NOT_FOUND)
Expand All @@ -46,7 +46,7 @@ class GymCommandService(
?: throw CustomException(GYM_NOT_FOUND)

if (member.memberType == TRAINER) {
gym.validateJoinCode(request.joinCode)
gym.validateJoinCode(request?.joinCode)
}

member.registerGym(gym)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class GymCommandController(
@PostMapping("/{gymId}")
fun selectMyGym(
@PathVariable gymId: Long,
@RequestBody request: CommandSelectMyGym,
@RequestBody request: CommandSelectMyGym?,
@AuthenticationPrincipal member: CustomMemberDetails,
): ApiResultResponse<CommandSelectMyGymResult> {
return ApiResultResponse(
Expand Down

0 comments on commit 629ef69

Please sign in to comment.