-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e7763eb
commit 5073627
Showing
7 changed files
with
115 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
DE/DE/Sources/Network/Auth/Endpoints/AuthorizationEndpoints.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Copyright © 2024 DRINKIG. All rights reserved | ||
|
||
import CoreModule | ||
import Foundation | ||
import Moya | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Copyright © 2024 DRINKIG. All rights reserved | ||
|
||
import CoreModule | ||
import Foundation | ||
import Moya | ||
|
||
|
1 change: 1 addition & 0 deletions
1
DE/DE/Sources/Network/Comment/Endpoints/RecommentEndpoints.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
// Copyright © 2024 DRINKIG. All rights reserved | ||
|
||
import CoreModule | ||
import Foundation | ||
import Moya | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,54 @@ | ||
//// | ||
//// WineClassAPI.swift | ||
//// Drink-EG | ||
// | ||
// WineClassAPI.swift | ||
// Drink-EG | ||
//import Core | ||
//import Foundation | ||
//import Moya | ||
// | ||
// Created by 김도연 on 8/12/24. | ||
//enum WineClassAPI { | ||
// case getAllWineClass | ||
// case getWineClass(id: Int) | ||
//} | ||
// | ||
|
||
import Foundation | ||
import Moya | ||
|
||
enum WineClassAPI { | ||
case getAllWineClass | ||
case getWineClass(id: Int) | ||
} | ||
|
||
extension WineClassAPI: TargetType { | ||
var baseURL: URL { | ||
return URL(string: Constants.API.baseURL)! | ||
} | ||
|
||
var path: String { | ||
switch self { | ||
case .getAllWineClass: | ||
return "/wine-class" | ||
case .getWineClass(let id): | ||
return "/wine-class/\(id)" | ||
} | ||
} | ||
|
||
var method: Moya.Method { | ||
switch self { | ||
case .getAllWineClass, .getWineClass: | ||
return .get | ||
} | ||
} | ||
|
||
var task: Moya.Task { | ||
switch self { | ||
case .getAllWineClass: | ||
return .requestPlain | ||
case .getWineClass(let id): | ||
return .requestParameters(parameters: ["wineClassId" : id], encoding: JSONEncoding.default) | ||
} | ||
} | ||
|
||
var headers: [String : String]? { | ||
return [ | ||
"Content-type": "application/json" | ||
] | ||
} | ||
|
||
var validationType: ValidationType { | ||
return .successCodes | ||
} | ||
|
||
} | ||
//extension WineClassAPI: TargetType { | ||
// var baseURL: URL { | ||
// return URL(string: Constants.API.baseURL)! | ||
// } | ||
// | ||
// var path: String { | ||
// switch self { | ||
// case .getAllWineClass: | ||
// return "/wine-class" | ||
// case .getWineClass(let id): | ||
// return "/wine-class/\(id)" | ||
// } | ||
// } | ||
// | ||
// var method: Moya.Method { | ||
// switch self { | ||
// case .getAllWineClass, .getWineClass: | ||
// return .get | ||
// } | ||
// } | ||
// | ||
// var task: Moya.Task { | ||
// switch self { | ||
// case .getAllWineClass: | ||
// return .requestPlain | ||
// case .getWineClass(let id): | ||
// return .requestParameters(parameters: ["wineClassId" : id], encoding: JSONEncoding.default) | ||
// } | ||
// } | ||
// | ||
// var headers: [String : String]? { | ||
// return [ | ||
// "Content-type": "application/json" | ||
// ] | ||
// } | ||
// | ||
// var validationType: ValidationType { | ||
// return .successCodes | ||
// } | ||
// | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,43 @@ | ||
// Copyright © 2024 DRINKIG. All rights reserved | ||
|
||
import Core | ||
import Foundation | ||
import Moya | ||
|
||
enum MemberInfoAPI { | ||
case patchMember(data: MemberInfoRequest) | ||
} | ||
|
||
extension MemberInfoAPI: TargetType { | ||
var baseURL: URL { | ||
return URL(string: Constants.API.baseURL)! | ||
} | ||
|
||
var path: String { | ||
switch self { | ||
case .patchMember: | ||
return "/member" | ||
} | ||
} | ||
|
||
var method: Moya.Method { | ||
return .patch | ||
} | ||
|
||
var task: Moya.Task { | ||
switch self { | ||
case .patchMember(let data): | ||
return .requestJSONEncodable(data) | ||
} | ||
} | ||
|
||
var headers: [String : String]? { | ||
return [ | ||
"Content-type": "application/json" | ||
] | ||
} | ||
|
||
var validationType: ValidationType { | ||
return .successCodes | ||
} | ||
} | ||
|
||
//enum MemberInfoAPI { | ||
// case patchMember(data: MemberInfoRequest) | ||
//} | ||
// | ||
//extension MemberInfoAPI: TargetType { | ||
// var baseURL: URL { | ||
// return URL(string: Constants.API.baseURL)! | ||
// } | ||
// | ||
// var path: String { | ||
// switch self { | ||
// case .patchMember: | ||
// return "/member" | ||
// } | ||
// } | ||
// | ||
// var method: Moya.Method { | ||
// return .patch | ||
// } | ||
// | ||
// var task: Moya.Task { | ||
// switch self { | ||
// case .patchMember(let data): | ||
// return .requestJSONEncodable(data) | ||
// } | ||
// } | ||
// | ||
// var headers: [String : String]? { | ||
// return [ | ||
// "Content-type": "application/json" | ||
// ] | ||
// } | ||
// | ||
// var validationType: ValidationType { | ||
// return .successCodes | ||
// } | ||
//} | ||
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters