-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
50 additions
and
85 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
server/api/src/main/kotlin/com/kw/api/common/dto/response/ApiResponse.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 5 additions & 8 deletions
13
server/api/src/main/kotlin/com/kw/api/domain/claim/controller/ClaimController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,22 @@ | ||
package com.kw.api.domain.claim.controller | ||
|
||
import com.kw.api.common.dto.response.ApiResponse | ||
import com.kw.api.domain.claim.dto.request.CreateClaimRequest | ||
import com.kw.api.domain.claim.dto.response.ClaimResponse | ||
import com.kw.api.domain.claim.service.ClaimService | ||
import io.swagger.v3.oas.annotations.Operation | ||
import io.swagger.v3.oas.annotations.tags.Tag | ||
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 org.springframework.http.HttpStatus | ||
import org.springframework.web.bind.annotation.* | ||
|
||
@Tag(name = "건의") | ||
@RestController | ||
@RequestMapping("/api/v1") | ||
class ClaimController(val claimService: ClaimService) { | ||
|
||
@Operation(summary = "건의 생성") | ||
@ResponseStatus(HttpStatus.CREATED) | ||
@PostMapping("/claims") | ||
fun createClaim(@RequestBody createClaimRequest: CreateClaimRequest): ApiResponse<ClaimResponse> { | ||
val response = claimService.createClaim(createClaimRequest) | ||
return ApiResponse.created(response) | ||
fun createClaim(@RequestBody createClaimRequest: CreateClaimRequest): ClaimResponse { | ||
return claimService.createClaim(createClaimRequest) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters