Skip to content

Commit

Permalink
refactor : 기존 메서드 findAllByMeeting 재활용하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
huncozyboy committed Jan 9, 2025
1 parent a5ed79e commit 060333e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public AttendanceDTO.Detail findAll(Long userId) {
public List<AttendanceDTO.AttendanceInfo> findAllAttendanceByMeeting(Long meetingId) {
Meeting meeting = meetingGetService.find(meetingId);

List<Attendance> attendances = meetingGetService.getAttendancesByMeeting(meeting);
List<Attendance> attendances = attendanceGetService.findAllByMeeting(meeting);

return attendances.stream()
.map(mapper::toAttendanceInfoDto)
Expand All @@ -104,7 +104,7 @@ public void close(LocalDate now, Integer cardinal) {
@Transactional
public void updateAttendanceStatus(List<AttendanceDTO.UpdateStatus> attendanceUpdates) {
attendanceUpdates.forEach(update -> {
Attendance attendance = attendanceGetService.findAttendanceId(update.attendanceId());
Attendance attendance = attendanceGetService.findByAttendanceId(update.attendanceId());
User user = attendance.getUser();

if (attendance.getStatus() == Status.ATTEND) {
Expand Down

0 comments on commit 060333e

Please sign in to comment.