Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down