-
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.
Merge branch 'Dev' of github.com:DDD-Community/PINGPONG-IOS into Dev
- Loading branch information
Showing
20 changed files
with
145 additions
and
47 deletions.
There are no files selected for viewing
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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
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
43 changes: 43 additions & 0 deletions
43
PingPong/Projects/Core/Domain/Service/Sources/Common/CommonService.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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// CommonService.swift | ||
// Service | ||
// | ||
// Created by 서원지 on 12/4/23. | ||
// Copyright © 2023 Wonji Suh. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Moya | ||
import API | ||
|
||
public enum CommonService { | ||
case searchCommCode(commCdTpCd: String) | ||
} | ||
|
||
|
||
extension CommonService: NoAuthBaseTargetType { | ||
public var path: String { | ||
switch self { | ||
case .searchCommCode(let commCdTpCd): | ||
return "\(PingPongAPISearch.searchCommonCode)\(commCdTpCd)" | ||
} | ||
} | ||
|
||
public var method: Moya.Method { | ||
switch self { | ||
case .searchCommCode: | ||
return .get | ||
} | ||
} | ||
|
||
public var task: Moya.Task { | ||
switch self { | ||
case .searchCommCode(_): | ||
let parameters : [String : Any] = [ | ||
: | ||
] | ||
|
||
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString) | ||
} | ||
} | ||
} |
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
25 changes: 25 additions & 0 deletions
25
PingPong/Projects/Core/Domain/Service/Sources/Foundation/NoAuthBaseTargetType.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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// NoAuthBaseTargetType.swift | ||
// Service | ||
// | ||
// Created by 서원지 on 12/4/23. | ||
// Copyright © 2023 Wonji Suh. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Moya | ||
import API | ||
|
||
public protocol NoAuthBaseTargetType: TargetType {} | ||
|
||
|
||
extension NoAuthBaseTargetType { | ||
public var baseURL: URL { | ||
return URL(string: PingPongAPI.baseURL)! | ||
} | ||
|
||
public var headers: [String : String]? { | ||
return APIConstants.noAuhtHeader | ||
} | ||
|
||
} |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.