Skip to content

Commit

Permalink
[Feat] sopt-makers#153- AttendanceService 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
devxsby committed Apr 15, 2023
1 parent a8f8866 commit 8ef46f3
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ import Moya
public typealias DefaultAttendanceService = BaseService<AttendanceAPI>

public protocol AttendanceService {

func fetchAttendanceSchedule() -> AnyPublisher<AttendanceScheduleEntity, Error>
func fetchAttendanceScore() -> AnyPublisher<AttendanceScoreEntity, Error>
}

extension DefaultAttendanceService: AttendanceService {

public func fetchAttendanceSchedule() -> AnyPublisher<AttendanceScheduleEntity, Error> {
requestObjectInCombine(AttendanceAPI.score)
}

public func fetchAttendanceScore() -> AnyPublisher<AttendanceScoreEntity, Error> {
requestObjectInCombine(AttendanceAPI.lecture)
}
}

0 comments on commit 8ef46f3

Please sign in to comment.