Skip to content

Commit

Permalink
feat #144: 코드리뷰-extension TargetType static 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
minsangKang committed Nov 24, 2024
1 parent 10b99ef commit bc51802
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project_Timer/Data/API/API.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Foundation
import Moya

extension TargetType {
static func parameters(from encodable: Encodable) -> [String: Any] {
func parameters(from encodable: Encodable) -> [String: Any] {
let encoder = JSONEncoder()
guard let data = try? encoder.encode(encodable),
let dictionary = try? JSONSerialization.jsonObject(with: data, options: .allowFragments) as? [String: Any] else {
Expand Down
4 changes: 2 additions & 2 deletions Project_Timer/Data/API/AuthAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ extension AuthAPI: TargetType {
case .postSignin(let request):
return .requestJSONEncodable(request)
case .getCheckUsername(let request):
return .requestParameters(parameters: Self.parameters(from: request), encoding: URLEncoding.queryString)
return .requestParameters(parameters: self.parameters(from: request), encoding: URLEncoding.queryString)
case .getCheckEmail(let request):
return .requestParameters(parameters: Self.parameters(from: request), encoding: URLEncoding.queryString)
return .requestParameters(parameters: self.parameters(from: request), encoding: URLEncoding.queryString)
case .postUpdatePassword(let request):
return .requestJSONEncodable(request)
}
Expand Down

0 comments on commit bc51802

Please sign in to comment.