Skip to content

Commit

Permalink
[FEAT] 예약 알림 상태 및 전송 시간 업데이트 Service Layer 메서드 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
yummygyudon committed Jan 17, 2025
1 parent b77561e commit 53335ef
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

import org.sopt.makers.operation.web.alarm.dto.request.AlarmInstantSendRequest;
import org.sopt.makers.operation.web.alarm.dto.request.AlarmScheduleSendRequest;
import org.sopt.makers.operation.web.alarm.dto.request.AlarmScheduleStatusUpdateRequest;
import org.sopt.makers.operation.web.alarm.dto.response.AlarmGetResponse;
import org.sopt.makers.operation.web.alarm.dto.response.AlarmCreateResponse;
import org.sopt.makers.operation.web.alarm.dto.response.AlarmListGetResponse;
Expand Down Expand Up @@ -91,6 +92,12 @@ public void deleteAlarm(long alarmId) {
alarmRepository.delete(alarm);
}

@Override
public void updateScheduleAlarm(long alarmId, AlarmScheduleStatusUpdateRequest request) {
val alarm = findAlarm(alarmId);
alarm.updateStatusToComplete(request.sendAt());
}

private Alarm findAlarm(long id) {
return alarmRepository.findById(id)
.orElseThrow(() -> new AlarmException(NOT_FOUND_ALARM));
Expand Down

0 comments on commit 53335ef

Please sign in to comment.