diff --git a/src/main/java/clap/server/application/service/label/ManageLabelService.java b/src/main/java/clap/server/application/service/label/ManageLabelService.java index 6a6b55cb..91298d8e 100644 --- a/src/main/java/clap/server/application/service/label/ManageLabelService.java +++ b/src/main/java/clap/server/application/service/label/ManageLabelService.java @@ -29,6 +29,8 @@ public void editLabel(Long adminId, Long labelId, EditLabelRequest request) { Label label = loadLabelPort.findById(labelId) .orElseThrow(() -> new ApplicationException(LabelErrorCode.LABEL_NOT_FOUND)); + loadLabelPort.existsByLabelName(request.labelName()); + label.updateLabel(request); commandLabelPort.save(label); } diff --git a/src/main/java/clap/server/application/service/notification/CountNotificationService.java b/src/main/java/clap/server/application/service/notification/CountNotificationService.java index 6b967d83..25c18c64 100644 --- a/src/main/java/clap/server/application/service/notification/CountNotificationService.java +++ b/src/main/java/clap/server/application/service/notification/CountNotificationService.java @@ -2,6 +2,7 @@ import clap.server.adapter.inbound.web.dto.notification.response.CountNotificationResponse; import clap.server.application.mapper.response.NotificationResponseMapper; +import clap.server.application.port.inbound.domain.MemberService; import clap.server.application.port.inbound.notification.CountNotificationUseCase; import clap.server.application.port.outbound.notification.LoadNotificationPort; import clap.server.common.annotation.architecture.ApplicationService; @@ -13,11 +14,14 @@ @RequiredArgsConstructor public class CountNotificationService implements CountNotificationUseCase { + private final MemberService memberService; private final LoadNotificationPort loadNotificationPort; @Transactional @Override public CountNotificationResponse countNotification(Long memberId) { + + memberService.findActiveMember(memberId); Integer count = loadNotificationPort.countNotification(memberId); return NotificationResponseMapper.toCountNotificationResponse(memberId, count);