공지사항 등록

This commit is contained in:
jini
2023-03-31 01:36:23 +09:00
parent 022e344fea
commit 9ff1c6ecec
8 changed files with 78 additions and 5 deletions

View File

@@ -0,0 +1,27 @@
package me.jiniworld.demohx.web.notice
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import me.jiniworld.demohx.annotation.WebAdapter
import me.jiniworld.demohx.application.notice.port.input.RegisterNoticeCommand
import me.jiniworld.demohx.application.notice.port.input.RegisterNoticeUseCase
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
@WebAdapter
@Tag(name = "setting-system", description = "설정-시스템(공지사항, FAQ, 이용약관, 메타정보 등)")
@RestController
@RequestMapping("/v1/notices")
internal class RegisterNoticeController(
private val registerNoticeUseCase: RegisterNoticeUseCase,
) {
@Operation(summary = "공지사항 등록")
@PostMapping("")
suspend fun getNotices(
@RequestBody command: RegisterNoticeCommand,
) = registerNoticeUseCase.registerNotice(command)
}