Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
CE4545CD295D7AF4003201E1 /* TaBarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4545CC295D7AF4003201E1 /* TaBarController.swift */; };
CE4545D2295D7AF5003201E1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE4545D1295D7AF5003201E1 /* Assets.xcassets */; };
CE4545D5295D7AF5003201E1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CE4545D3295D7AF5003201E1 /* LaunchScreen.storyboard */; };
CE4942AA296FCCFC00736701 /* UploadedCourseDetailRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4942A9296FCCFC00736701 /* UploadedCourseDetailRouter.swift */; };
CE4942AD296FCD2300736701 /* UploadedCourseDetailResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE4942AC296FCD2300736701 /* UploadedCourseDetailResponseDto.swift */; };
CE55BC11296D4EA600E8CD69 /* RunningRecordRequestDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE55BC10296D4EA600E8CD69 /* RunningRecordRequestDto.swift */; };
CE5645162961B72E000A2856 /* ImageLiterals.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE5645152961B72E000A2856 /* ImageLiterals.swift */; };
CE58759E29601476005D967E /* LoadingIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE58759D29601476005D967E /* LoadingIndicator.swift */; };
Expand Down Expand Up @@ -170,9 +172,7 @@
CE0D9FD229648DA300CEB5CD /* CustomAlertVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomAlertVC.swift; sourceTree = "<group>"; };
CE10063929680C5700FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10063D29680C8100FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10063E29680C8800FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10064329680CB400FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10064429680CBC00FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10064D29680D2500FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10064F29680D3300FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CE10065029680D3800FD31FB /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
Expand Down Expand Up @@ -211,6 +211,8 @@
CE4545D1295D7AF5003201E1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
CE4545D4295D7AF5003201E1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
CE4545D6295D7AF5003201E1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
CE4942A9296FCCFC00736701 /* UploadedCourseDetailRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseDetailRouter.swift; sourceTree = "<group>"; };
CE4942AC296FCD2300736701 /* UploadedCourseDetailResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadedCourseDetailResponseDto.swift; sourceTree = "<group>"; };
CE55BC10296D4EA600E8CD69 /* RunningRecordRequestDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunningRecordRequestDto.swift; sourceTree = "<group>"; };
CE5645152961B72E000A2856 /* ImageLiterals.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageLiterals.swift; sourceTree = "<group>"; };
CE58759D29601476005D967E /* LoadingIndicator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoadingIndicator.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -285,7 +287,6 @@
CEEC6B432961C59F00D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B442961C5A800D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B452961C5B200D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B462961C5BB00D00E1E /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = "<group>"; };
CEEC6B482961C5E200D00E1E /* SplashVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashVC.swift; sourceTree = "<group>"; };
CEEC6B4A2961D89700D00E1E /* CustomNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomNavigationBar.swift; sourceTree = "<group>"; };
CEF3CD97296D63B9002723A1 /* CourseStorageRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseStorageRouter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -411,7 +412,7 @@
CE10063329680BFD00FD31FB /* CourseDetailDto */ = {
isa = PBXGroup;
children = (
CE10063E29680C8800FD31FB /* .gitkeep */,
CE4942AB296FCD1000736701 /* ResponseDto */,
);
path = CourseDetailDto;
sourceTree = "<group>";
Expand Down Expand Up @@ -687,7 +688,6 @@
CE17F0472961C3E900E1DED0 /* VC */ = {
isa = PBXGroup;
children = (
CEEC6B462961C5BB00D00E1E /* .gitkeep */,
A3BC2F422966A93100198261 /* CourseDetailVC.swift */,
);
path = VC;
Expand Down Expand Up @@ -765,7 +765,7 @@
CE40BB2A296808440030ABCA /* CourseDetailRouter */ = {
isa = PBXGroup;
children = (
CE10064429680CBC00FD31FB /* .gitkeep */,
CE4942A9296FCCFC00736701 /* UploadedCourseDetailRouter.swift */,
);
path = CourseDetailRouter;
sourceTree = "<group>";
Expand Down Expand Up @@ -808,6 +808,14 @@
path = "Runnect-iOS";
sourceTree = "<group>";
};
CE4942AB296FCD1000736701 /* ResponseDto */ = {
isa = PBXGroup;
children = (
CE4942AC296FCD2300736701 /* UploadedCourseDetailResponseDto.swift */,
);
path = ResponseDto;
sourceTree = "<group>";
};
CE55BC0F296D4E5500E8CD69 /* RNUtils */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1321,6 +1329,7 @@
CE14677829658C7200DCEA1B /* Stopwatch.swift in Sources */,
CE40BB22296806140030ABCA /* NetworkHelper.swift in Sources */,
CE5645162961B72E000A2856 /* ImageLiterals.swift in Sources */,
CE4942AD296FCD2300736701 /* UploadedCourseDetailResponseDto.swift in Sources */,
CE6655CD295D856300C64E12 /* KeyPathFindable.swift in Sources */,
CE29D582296402B500F47542 /* CourseDrawingVC.swift in Sources */,
CE6655E4295D884600C64E12 /* UILabel+.swift in Sources */,
Expand Down Expand Up @@ -1420,6 +1429,7 @@
CE17F02D2961BBA100E1DED0 /* ColorLiterals.swift in Sources */,
CEC2A68E2962AF2C00160BF7 /* RNMarker.swift in Sources */,
CE6655D2295D862A00C64E12 /* Publisher+Driver.swift in Sources */,
CE4942AA296FCCFC00736701 /* UploadedCourseDetailRouter.swift in Sources */,
A3BC2F382963CE3700198261 /* ActivityRecordInfoModel.swift in Sources */,
CE6655E6295D887F00C64E12 /* UIStackView+.swift in Sources */,
A3BC2F34296303A600198261 /* GoalRewardInfoCVC.swift in Sources */,
Expand Down
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// UploadedCourseDetailResponseDto.swift
// Runnect-iOS
//
// Created by sejin on 2023/01/12.
//

import Foundation

// MARK: - UploadedCourseDetailResponseDto

struct UploadedCourseDetailResponseDto: Codable {
let user: UploadUser
let publicCourse: PublicCourse
}

// MARK: - UploadUser

struct UploadUser: Codable {
let nickname: String
let level: Int
let image: String
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ struct PublicCourse: Codable {
let title: String
let image: String
let scarp: Bool?
let description: String?
let distance: Float?
let departure: CourseDiscoveryDeparture
}

Expand All @@ -28,4 +30,6 @@ struct PublicCourse: Codable {
struct CourseDiscoveryDeparture: Codable {
let region: String
let city: String
let town: String?
let name: String?
}
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
//
// UploadedCourseDetailRouter.swift
// Runnect-iOS
//
// Created by sejin on 2023/01/12.
//

import Foundation

import Moya

enum UploadedCourseDetailRouter {
case getUploadedCourseDetail(publicCourseId: Int)
}

extension UploadedCourseDetailRouter: 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 .getUploadedCourseDetail(let publicCourseId):
return "/public-course/detail/\(publicCourseId)"
}
}

var method: Moya.Method {
switch self {
case .getUploadedCourseDetail:
return .get
}
}

var task: Moya.Task {
switch self {
case .getUploadedCourseDetail:
return .requestPlain
}
}

var headers: [String: String]? {
switch self {
case .getUploadedCourseDetail:
return Config.headerWithDeviceId
}
}
}
Empty file.
Loading