From 2f0081f31fcd70e6764055f5d1698cb18d089f96 Mon Sep 17 00:00:00 2001 From: uuuuuuuk Date: Sat, 16 Dec 2023 03:20:18 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20EnvironmentController=20=EC=9E=91?= =?UTF-8?q?=EC=84=B1=20=EB=B0=8F=20=EC=98=A4=EB=8A=98=EC=9D=98=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=20=EC=A0=95=EB=B3=B4=20=EB=B6=88=EB=9F=AC=EC=98=A4?= =?UTF-8?q?=EA=B8=B0=20api=20=EB=93=B1=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/EnvironmentController.kt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/main/kotlin/andreas311/miso/domain/environment/presentation/EnvironmentController.kt diff --git a/src/main/kotlin/andreas311/miso/domain/environment/presentation/EnvironmentController.kt b/src/main/kotlin/andreas311/miso/domain/environment/presentation/EnvironmentController.kt new file mode 100644 index 00000000..f51f2402 --- /dev/null +++ b/src/main/kotlin/andreas311/miso/domain/environment/presentation/EnvironmentController.kt @@ -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 = + getTodayEnvironmentInfoService.execute() + .let { ResponseEntity.status(HttpStatus.OK).body(it) } +} \ No newline at end of file