Skip to content

Commit

Permalink
Merge pull request #54 from team-nabi/NO-JIRA--yejin--hotfix--suggest…
Browse files Browse the repository at this point in the history
…ion-update-dto

NABI-NO-JIRA : suggestion update request param -> body
  • Loading branch information
born-A authored Nov 21, 2023
2 parents 7f0f7af + e73b016 commit 6ce9db8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import lombok.RequiredArgsConstructor;

import org.prgrms.nabimarketbe.domain.suggestion.dto.request.SuggestionRequestDTO;
import org.prgrms.nabimarketbe.domain.suggestion.dto.request.SuggestionUpdateRequestDTO;
import org.prgrms.nabimarketbe.domain.suggestion.dto.response.projection.SuggestionListReadPagingResponseDTO;
import org.prgrms.nabimarketbe.domain.suggestion.dto.response.SuggestionResponseDTO;
import org.prgrms.nabimarketbe.domain.suggestion.entity.DirectionType;
Expand Down Expand Up @@ -59,15 +60,14 @@ public ResponseEntity<SingleResult<SuggestionListReadPagingResponseDTO>> getSugg
@PutMapping("/decision")
public ResponseEntity<SingleResult<SuggestionResponseDTO>> updateSugggestionStatus(
@RequestHeader(name = "Authorization") String token,
@RequestParam Long fromCardId,
@RequestParam Long toCardId,
@RequestParam Boolean isAccepted
@RequestBody SuggestionUpdateRequestDTO suggestionUpdateDTO

) {
SuggestionResponseDTO suggestionResponseDTO = suggestionService.updateSuggestionStatus(
token,
fromCardId,
toCardId,
isAccepted
suggestionUpdateDTO.fromCardId(),
suggestionUpdateDTO.toCardId(),
suggestionUpdateDTO.isAccepted()
);

return ResponseEntity.ok(ResponseFactory.getSingleResult(suggestionResponseDTO));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package org.prgrms.nabimarketbe.domain.suggestion.dto.request;

public record SuggestionUpdateRequestDTO(
Long fromCardId,
Long toCardId,
Boolean isAccepted
) {
}

0 comments on commit 6ce9db8

Please sign in to comment.