Skip to content

Commit

Permalink
Fix : CreatedDate 삭제, validation 예외 처리 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Astin01 committed Oct 22, 2024
1 parent d7b79af commit 94defe5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import solitour_backend.solitour.auth.config.Authenticated;
import solitour_backend.solitour.auth.config.AuthenticationPrincipal;
import solitour_backend.solitour.error.Utils;
import solitour_backend.solitour.information_comment.dto.request.InformationCommentRequest;
import solitour_backend.solitour.information_comment.dto.respose.InformationCommentListResponse;
import solitour_backend.solitour.information_comment.dto.respose.InformationCommentResponse;
Expand All @@ -28,7 +30,9 @@ public class InformationCommentController {
@PostMapping("/{informationId}")
public ResponseEntity<InformationCommentResponse> createInformationComment(@AuthenticationPrincipal Long userId,
@PathVariable Long informationId,
@Valid @RequestBody InformationCommentRequest informationCommentRequest) {
@Valid @RequestBody InformationCommentRequest informationCommentRequest,
BindingResult bindingResult) {
Utils.validationRequest(bindingResult);

InformationCommentResponse informationCommentResponse = informationCommentService.createInformationComment(userId, informationId, informationCommentRequest);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public class InformationComment {
@Column(name = "information_comment_created_date")
private LocalDateTime createdDate;

@CreatedDate
@Column(name = "information_comment_updated_date")
private LocalDateTime updatedDate;

Expand Down

0 comments on commit 94defe5

Please sign in to comment.