Skip to content

Commit

Permalink
✨ EnvironmentController 작성 및 오늘의 환경 정보 불러오기 api 등록
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuuuuuk committed Dec 15, 2023
1 parent bc7c8b3 commit 2f0081f
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package andreas311.miso.domain.environment.presentation

import andreas311.miso.domain.environment.presentation.data.response.EnvironmentInfoResponseDto
import andreas311.miso.domain.environment.service.GetTodayEnvironmentInfoService
import andreas311.miso.global.annotation.RequestController
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.GetMapping

@RequestController("/environment")
class EnvironmentController(
private val getTodayEnvironmentInfoService: GetTodayEnvironmentInfoService
) {

@GetMapping
fun today(): ResponseEntity<EnvironmentInfoResponseDto> =
getTodayEnvironmentInfoService.execute()
.let { ResponseEntity.status(HttpStatus.OK).body(it) }
}

0 comments on commit 2f0081f

Please sign in to comment.