Skip to content

Commit

Permalink
feat: 출석 정보 save 로직 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
ddingmin committed May 25, 2024
1 parent 519406c commit 87e36cc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ class AttendanceAlreadyExistsException : AttendanceException(ErrorCode.ALREADY_A
class InvalidCheckInTimeException : AttendanceException(ErrorCode.INVALID_CHECKIN_TIME)
class MissingPlaceParamException : AttendanceException(ErrorCode.MISSING_PLACE_PARAM)
class InvalidCheckInDistanceException : AttendanceException(ErrorCode.INVALID_CHECKIN_DISTANCE)
class NotFoundAttendanceException : AttendanceException(ErrorCode.NOT_EXIST_ATTENDANCE)
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ enum class ErrorCode(
INVALID_CHECKIN_TIME("AT0004", "현재 주차에 해당하는 세션을 찾을 수 없습니다."),
MISSING_PLACE_PARAM("AT0005", "오프라인 세션 출석체크의 현재 위치 정보가 누락되었습니다."),
INVALID_CHECKIN_DISTANCE("AT0006", "현재 위치와 세션 장소의 거리가 너무 멉니다."),
NOT_EXIST_ATTENDANCE("AT0007", "해당하는 출석 정보가 없습니다.")
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.depromeet.makers.domain.usecase

import com.depromeet.makers.domain.exception.NotFoundAttendanceException
import com.depromeet.makers.domain.gateway.AttendanceGateway
import com.depromeet.makers.domain.gateway.MemberGateway
import com.depromeet.makers.domain.gateway.SessionGateway
Expand Down Expand Up @@ -43,16 +44,7 @@ class GetMemberAttendances(
generation = input.generation,
week = week
)
}.getOrDefault(
attendanceGateway.save(
Attendance.newAttendance(
member = member,
generation = input.generation,
week = week,
sessionType = sessions[week - 1].sessionType,
)
)
)
}.getOrElse { throw NotFoundAttendanceException() }
}

var offlineAbsenceScore = 0.0
Expand Down

0 comments on commit 87e36cc

Please sign in to comment.