Skip to content

Commit

Permalink
feat: groupList API 경로 수정 (TeamNADA#422)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlwns33 committed Apr 15, 2023
1 parent 0e33fa9 commit 0b045b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class GroupAPI {
}

func groupListFetch(userID: String, completion: @escaping (NetworkResult<Any>) -> Void) {
groupProvider.request(.groupListFetch(userID: userID)) { (result) in
groupProvider.request(.groupListFetch) { (result) in
switch result {
case .success(let response):
let statusCode = response.statusCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Foundation
import Moya

enum GroupService {
case groupListFetch(userID: String)
case groupListFetch
case groupDelete(groupID: Int, defaultGroupId: Int)
case groupAdd(groupRequest: GroupAddRequest)
case groupEdit(groupRequest: GroupEditRequest)
Expand Down Expand Up @@ -37,7 +37,7 @@ extension GroupService: TargetType {
var path: String {
switch self {
case .groupListFetch, .groupReset:
return "/groups"
return "/card-group/list"
case .groupDelete(let groupID, _):
return "/group/\(groupID)"
case .groupAdd, .groupEdit:
Expand Down Expand Up @@ -70,9 +70,8 @@ extension GroupService: TargetType {

var task: Task {
switch self {
case .groupListFetch(let userID):
return .requestParameters(parameters: ["userId": userID],
encoding: URLEncoding.queryString)
case .groupListFetch:
return .requestPlain
case .cardDeleteInGroup, .groupReset:
return .requestPlain
case .groupDelete(_, let defaultGroupId):
Expand Down

0 comments on commit 0b045b6

Please sign in to comment.