From 556c05fcc0aa72902b235d14528e6af7bc0db7ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=98=81=EC=9D=B8?= <0inn1220@gmail.com> Date: Sat, 22 Apr 2023 22:17:16 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20#199=20-=20url=20path=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Network/Sources/API/AttendanceAPI.swift | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SOPT-iOS/Projects/Modules/Network/Sources/API/AttendanceAPI.swift b/SOPT-iOS/Projects/Modules/Network/Sources/API/AttendanceAPI.swift index beaaa1c3..e6c6602c 100644 --- a/SOPT-iOS/Projects/Modules/Network/Sources/API/AttendanceAPI.swift +++ b/SOPT-iOS/Projects/Modules/Network/Sources/API/AttendanceAPI.swift @@ -16,7 +16,7 @@ public enum AttendanceAPI { case score case total case lectureRound(lectureId: Int) - case attend(lectureRoundId: Int, code: Int) + case attend(lectureRoundId: Int, code: String) } extension AttendanceAPI: BaseAPI { @@ -26,7 +26,7 @@ extension AttendanceAPI: BaseAPI { // MARK: - Header public var headers: [String: String]? { switch self { - case .lecture, .score, .total: + case .lecture, .score, .total, .lectureRound, .attend: return HeaderType.jsonWithToken.value default: return HeaderType.json.value } @@ -38,13 +38,13 @@ extension AttendanceAPI: BaseAPI { case .lecture: return "lecture" case .score: - return "score" + return "members/score" case .total: return "total" case .lectureRound(let lectureId): - return "lecture/round/\(lectureId)" + return "lectures/round/\(lectureId)" case .attend: - return "attend" + return "attendances/attend" } } @@ -81,6 +81,8 @@ extension AttendanceAPI: BaseAPI { public var task: Task { switch self { + case .attend: + return .requestParameters(parameters: bodyParameters ?? [:], encoding: parameterEncoding) default: return .requestPlain }