diff --git a/src/main/kotlin/com/routebox/routebox/application/route/CheckProgressRouteUseCase.kt b/src/main/kotlin/com/routebox/routebox/application/route/CheckProgressRouteUseCase.kt index 761fffe..3f889c9 100644 --- a/src/main/kotlin/com/routebox/routebox/application/route/CheckProgressRouteUseCase.kt +++ b/src/main/kotlin/com/routebox/routebox/application/route/CheckProgressRouteUseCase.kt @@ -1,6 +1,5 @@ package com.routebox.routebox.application.route -import com.routebox.routebox.application.route.dto.CheckProgressRouteCommand import com.routebox.routebox.domain.route.RouteService import org.springframework.stereotype.Component import org.springframework.transaction.annotation.Transactional @@ -17,8 +16,8 @@ class CheckProgressRouteUseCase( * @throws */ @Transactional(readOnly = true) - operator fun invoke(command: CheckProgressRouteCommand): Long? { - val route = routeService.getProgressRouteByUserId(command.userLocalTime, command.userId).let { + operator fun invoke(userId: Long): Long? { + val route = routeService.getProgressRouteByUserId(userId).let { it ?: return null } return route.id diff --git a/src/main/kotlin/com/routebox/routebox/application/route/dto/CheckProgressRouteCommand.kt b/src/main/kotlin/com/routebox/routebox/application/route/dto/CheckProgressRouteCommand.kt deleted file mode 100644 index 0eba321..0000000 --- a/src/main/kotlin/com/routebox/routebox/application/route/dto/CheckProgressRouteCommand.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.routebox.routebox.application.route.dto - -import java.time.LocalDateTime - -data class CheckProgressRouteCommand( - val userId: Long, - val userLocalTime: LocalDateTime, -) diff --git a/src/main/kotlin/com/routebox/routebox/controller/route/RouteCommandController.kt b/src/main/kotlin/com/routebox/routebox/controller/route/RouteCommandController.kt index ad70922..d27f5e4 100644 --- a/src/main/kotlin/com/routebox/routebox/controller/route/RouteCommandController.kt +++ b/src/main/kotlin/com/routebox/routebox/controller/route/RouteCommandController.kt @@ -11,10 +11,8 @@ import com.routebox.routebox.application.route.GetMyRouteListUseCase import com.routebox.routebox.application.route.UpdateRouteActivityUseCase import com.routebox.routebox.application.route.UpdateRoutePublicUseCase import com.routebox.routebox.application.route.UpdateRouteUseCase -import com.routebox.routebox.application.route.dto.CheckProgressRouteCommand import com.routebox.routebox.application.route.dto.DeleteRouteActivityCommand import com.routebox.routebox.application.route.dto.DeleteRouteCommand -import com.routebox.routebox.controller.route.dto.CheckProgressRouteRequest import com.routebox.routebox.controller.route.dto.CheckProgressRouteResponse import com.routebox.routebox.controller.route.dto.CreateRouteActivityRequest import com.routebox.routebox.controller.route.dto.CreateRouteActivityResponse @@ -40,7 +38,6 @@ import io.swagger.v3.oas.annotations.Operation import io.swagger.v3.oas.annotations.security.SecurityRequirement import io.swagger.v3.oas.annotations.tags.Tag import jakarta.validation.Valid -import org.springdoc.core.annotations.ParameterObject import org.springframework.http.MediaType import org.springframework.security.core.annotation.AuthenticationPrincipal import org.springframework.validation.annotation.Validated @@ -54,7 +51,6 @@ import org.springframework.web.bind.annotation.PutMapping import org.springframework.web.bind.annotation.RequestBody import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController -import java.time.LocalDateTime import kotlin.random.Random @Tag(name = "내루트 관련 API") @@ -225,21 +221,15 @@ class RouteCommandController( @Operation( summary = "기록 진행중인 루트 여부 조회", - description = "
기록 진행중인 루트가 존재하는 경우 routeId: Int
반환, 없는 경우 routeId : null
반환
사용자 기기 기준 시간 = userLocalTime: yyyy-MM-ddTHH:mm:ss
형식의 문자열로 전달해야 함 (optional)
기록 진행중인 루트가 존재하는 경우 routeId: Int
반환, 없는 경우 routeId : null
반환