package roomescape.theme.web import jakarta.validation.Valid import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.* import roomescape.common.dto.response.CommonApiResponse import roomescape.theme.business.ThemeService import roomescape.theme.docs.PublicThemeAPI @RestController @RequestMapping("/themes") class ThemeController( private val themeService: ThemeService, ) : PublicThemeAPI { @PostMapping("/batch") override fun findThemeInfosByIds( @Valid @RequestBody request: ThemeIdListRequest ): ResponseEntity> { val response = themeService.findAllInfosByIds(request) return ResponseEntity.ok(CommonApiResponse(response)) } @GetMapping("/{id}") override fun findThemeInfoById( @PathVariable id: Long ): ResponseEntity> { val response = themeService.findInfoById(id) return ResponseEntity.ok(CommonApiResponse(response)) } }