Skip to content

Commit

Permalink
Merge pull request #112 from Hanaro-trip-together-bank/trip
Browse files Browse the repository at this point in the history
fix: 수정/삭제 동일인 체크 오류 수정
  • Loading branch information
mummhy0811 authored Jun 4, 2024
2 parents 233f2e4 + e390298 commit 2186660
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 237 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void updateReply(Long trip_place_idx, TripReplyUpdateReqDto dto) {
validateAndReturn(trip_place_idx, tripplace.getTrip().getTeam().getTeamIdx(), dto.getMemberIdx());

TripReply tripReply = checkTripReplyExist(dto.getTripReplyIdx());
checkSameMember(tripReply.getTeamMember().getTeamMemberIdx(),dto.getMemberIdx());
checkSameMember(tripReply.getTeamMember().getMember().getMemberIdx(),dto.getMemberIdx());

tripReply.update(dto.getTripReplyContent());
}
Expand All @@ -55,7 +55,7 @@ public void deleteReply(Long trip_place_idx, TripReplyDeleteReqDto dto) {
validateAndReturn(trip_place_idx, tripplace.getTrip().getTeam().getTeamIdx(), dto.getMemberIdx());

TripReply tripReply = checkTripReplyExist(dto.getTripReplyIdx());
checkSameMember(tripReply.getTeamMember().getTeamMemberIdx(),dto.getMemberIdx());
checkSameMember(tripReply.getTeamMember().getMember().getMemberIdx(),dto.getMemberIdx());

tripReplyRepository.deleteById(dto.getTripReplyIdx());
}
Expand Down
Loading

0 comments on commit 2186660

Please sign in to comment.