package com.tcm.training.admin.app.home.controller; import com.tcm.training.admin.app.home.dto.CreateLiveRoomEntryRequest; import com.tcm.training.admin.app.home.service.AppVzanLiveEntryService; import com.tcm.training.admin.app.home.vo.AppVzanLiveEntryVO; import com.tcm.training.admin.common.ApiResponse; import com.tcm.training.admin.live.service.LiveRoomSettingService; import com.tcm.training.admin.live.vo.LiveRoomSettingVO; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; @RestController @RequestMapping({"/api/app/home", "/api/v1/app/home"}) public class AppLiveRoomSettingController { private final LiveRoomSettingService service; private final AppVzanLiveEntryService vzanLiveEntryService; public AppLiveRoomSettingController(LiveRoomSettingService service, AppVzanLiveEntryService vzanLiveEntryService) { this.service = service; this.vzanLiveEntryService = vzanLiveEntryService; } @GetMapping("/live-room-setting") public ApiResponse current() { return ApiResponse.ok(service.current()); } @PostMapping("/live-room-entry") public ApiResponse createEntry(@Valid @RequestBody CreateLiveRoomEntryRequest request) { return ApiResponse.ok(vzanLiveEntryService.createEntry(request.getUserId())); } }