Skip to content

Commit

Permalink
Merge pull request #112 from jurumarble/dev
Browse files Browse the repository at this point in the history
fix : 투표 제목, 투표 내용, 제목 A,B 수정 Request 에 @Valid 추가
  • Loading branch information
alsduq1117 authored Oct 20, 2023
2 parents 8615a37 + 7e8baf9 commit e18e14c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ public ResponseEntity<VoteWithPostedUserData> getVote(@PathVariable Long voteId)

@Operation(summary = "일반 투표 수정", description = "파라미터에 voteId, 바디에 {title, detail, titleA, titleB} json 형식으로 보내주시면 됩니다.")
@PutMapping("/{voteId}/normal")
public ResponseEntity<HttpStatus> updateNormalVote(@PathVariable("voteId") Long voteId, @RequestBody UpdateNormalVoteRequest request, @RequestAttribute Long userId) {
public ResponseEntity<HttpStatus> updateNormalVote(@PathVariable("voteId") Long voteId, @Valid @RequestBody UpdateNormalVoteRequest request, @RequestAttribute Long userId) {
voteService.updateNormalVote(request.toServiceRequest(voteId, userId));
return new ResponseEntity(HttpStatus.OK);
}

@Operation(summary = "전통주 투표 수정", description = "파라미터에 voteId, 바디에 {title, detail, titleA, titleB} json 형식으로 보내주시면 됩니다.")
@PutMapping("/{voteId}/drink")
public ResponseEntity<HttpStatus> updateDrinkVote(@PathVariable("voteId") Long voteId, @RequestBody UpdateDrinkVoteRequest request, @RequestAttribute Long userId) {
public ResponseEntity<HttpStatus> updateDrinkVote(@PathVariable("voteId") Long voteId, @Valid @RequestBody UpdateDrinkVoteRequest request, @RequestAttribute Long userId) {
voteService.updateDrinkVote(request.toServiceRequest(voteId, userId));
return new ResponseEntity(HttpStatus.OK);
}
Expand Down

0 comments on commit e18e14c

Please sign in to comment.