Skip to content

Commit

Permalink
refactor: 불필요한 update 호출 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
yoondgu committed Nov 3, 2023
1 parent bda1f24 commit 986ffb1
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import com.mapbefine.mapbefine.topic.dto.request.TopicUpdateRequest;
import com.mapbefine.mapbefine.topic.exception.TopicException.TopicBadRequestException;
import com.mapbefine.mapbefine.topic.exception.TopicException.TopicForbiddenException;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.List;
import java.util.NoSuchElementException;
Expand Down Expand Up @@ -106,7 +105,6 @@ private void copyPinsToTopic(
List<Pin> originalPins = findAllPins(pinIds);
validateCopyablePins(member, originalPins);
topic.increasePinCount(pinIds.size());
topic.updateLastPinUpdatedAt(LocalDateTime.now());
pinRepository.flush();

pinRepository.saveAllToTopic(topic, originalPins);
Expand Down Expand Up @@ -139,7 +137,6 @@ public Long merge(AuthMember member, TopicMergeRequest request) {
List<Pin> originalPins = getAllPinsFromTopics(originalTopics);

topic.increasePinCount(originalPins.size());
topic.updateLastPinUpdatedAt(LocalDateTime.now());

topicRepository.save(topic);
pinRepository.saveAllToTopic(topic, originalPins);
Expand Down

0 comments on commit 986ffb1

Please sign in to comment.