-
Notifications
You must be signed in to change notification settings - Fork 6
[Feat] #81 - 코스업로드하기 API 연결 완료 #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
95de6e2
[Feat] #81 - 코스업로드하기 API 연결 완료
lee-yeonwoo2 b3d3c17
[Fix] #81 - Merged
lee-yeonwoo2 b03d9a9
[Fix] #81 - api 부분 약간 수정
lee-yeonwoo2 0989778
[Fix] #81 - comment 반영
lee-yeonwoo2 884cee7
Merge branch 'Runnect:develop' into #81CourseUploadAPI
lee-yeonwoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -17,7 +17,6 @@ extension Encodable { | |
| as? [String: Any] else { | ||
| throw NSError() | ||
| } | ||
|
|
||
| return dictionary | ||
| } | ||
| } | ||
15 changes: 15 additions & 0 deletions
15
...iOS/Runnect-iOS/Network/Dto/CourseDiscoveryDto/RequestDto/CourseUploadingRequestDto.swift
This file contains hidden or 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,15 @@ | ||
| // | ||
| // CourseUploadingRequestDto.swift | ||
| // Runnect-iOS | ||
| // | ||
| // Created by YEONOO on 2023/01/11. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| // MARK: - CourseUploadingRequestDto | ||
|
|
||
| struct CourseUploadingRequestDto: Codable { | ||
| let courseId: Int | ||
| let title, description: String | ||
| } |
53 changes: 53 additions & 0 deletions
53
Runnect-iOS/Runnect-iOS/Network/Router/CourseDiscoveryRouter/CourseUploadingRouter.swift
This file contains hidden or 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,53 @@ | ||
| // | ||
| // CourseUploadingRouter.swift | ||
| // Runnect-iOS | ||
| // | ||
| // Created by YEONOO on 2023/01/11. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| import Moya | ||
|
|
||
| enum CourseUploadingRouter { | ||
| case courseUploadingData(param: CourseUploadingRequestDto) | ||
| } | ||
|
|
||
| extension CourseUploadingRouter: TargetType { | ||
| var baseURL: URL { | ||
| guard let url = URL(string: Config.baseURL) else { | ||
| fatalError("baseURL could not be configured") | ||
| } | ||
|
|
||
| return url | ||
| } | ||
|
|
||
| var path: String { | ||
| switch self { | ||
| case .courseUploadingData: | ||
| return "/public-course" | ||
| } | ||
| } | ||
|
|
||
| var method: Moya.Method { | ||
| switch self { | ||
| case .courseUploadingData: | ||
| return .post | ||
| } | ||
| } | ||
|
|
||
| var task: Moya.Task { | ||
| switch self { | ||
| case .courseUploadingData(param: let param): | ||
| return .requestParameters(parameters: try! param.asParameter(), encoding: JSONEncoding.default) | ||
| } | ||
| } | ||
|
|
||
| var headers: [String: String]? { | ||
| switch self { | ||
| case .courseUploadingData: | ||
| return Config.headerWithDeviceId | ||
| } | ||
| } | ||
|
|
||
| } |
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.