Skip to content

Commit

Permalink
FIX :: [IOS-34] RoutineAPI 리펙토링
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunho0922 committed Mar 30, 2024
1 parent 1091761 commit 8d607b3
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions Projects/Modules/MGNetworks/Sources/API/SelfCare/RoutineAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,12 @@ extension RoutineAPI: BaseAPI {
switch self {
case .routineAdd:
return .post
case .routineMyAll:
return .get
case .routineTodayMyAll:
case .routineMyAll, .routineTodayMyAll, .routineMonthCheck:
return .get
case .routineDelete:
return .delete
case .routineEdit:
return .put
case .routineTodayComplete:
case .routineEdit, .routineTodayComplete:
return .put
case .routineMonthCheck:
return .get
}
}

Expand Down Expand Up @@ -129,11 +123,7 @@ extension RoutineAPI: BaseAPI {
let .routineEdit(accessToken, _, _, _, _, _, _),
let .routineTodayComplete(accessToken),
let .routineMonthCheck(accessToken, _):
return authorizationHeader(using: accessToken)
return ["Authorization": "\(accessToken)"]
}
}

private func authorizationHeader(using accessToken: String) -> [String: String] {
return ["Authorization": accessToken]
}
}

0 comments on commit 8d607b3

Please sign in to comment.