Skip to content

Commit 1ee5c99

Browse files
authored
Merge pull request #133 from lee-yeonwoo/#125-내가그린코스삭제
[Feat]#125 - 내가 업로드한 코스 삭제 및 수정하기 기능 구현
2 parents 704931b + 375e119 commit 1ee5c99

File tree

17 files changed

+555
-32
lines changed

17 files changed

+555
-32
lines changed

Runnect-iOS/Runnect-iOS.xcodeproj/project.pbxproj

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@
145145
CEEC6B4B2961D89700D00E1E /* CustomNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEEC6B4A2961D89700D00E1E /* CustomNavigationBar.swift */; };
146146
CEF3CD9A296DB305002723A1 /* CourseDetailResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEF3CD99296DB305002723A1 /* CourseDetailResponseDto.swift */; };
147147
CEFA9A2F29FC263700F2D0CF /* UserDeleteResponseDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEFA9A2E29FC263700F2D0CF /* UserDeleteResponseDto.swift */; };
148+
DA0587F22A05D54100B72869 /* EditCourseRequestDto.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0587F12A05D54100B72869 /* EditCourseRequestDto.swift */; };
149+
DA0587F42A05DEC000B72869 /* CourseEditVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA0587F32A05DEC000B72869 /* CourseEditVC.swift */; };
148150
DA20D847296697A600F1581F /* MyCourseSelectVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D846296697A600F1581F /* MyCourseSelectVC.swift */; };
149151
DA20D849296697B400F1581F /* CourseUploadVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D848296697B400F1581F /* CourseUploadVC.swift */; };
150152
DA20D84E2966A9B300F1581F /* CourseSearchVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA20D84D2966A9B300F1581F /* CourseSearchVC.swift */; };
@@ -307,6 +309,8 @@
307309
CEEC6B4A2961D89700D00E1E /* CustomNavigationBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomNavigationBar.swift; sourceTree = "<group>"; };
308310
CEF3CD99296DB305002723A1 /* CourseDetailResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseDetailResponseDto.swift; sourceTree = "<group>"; };
309311
CEFA9A2E29FC263700F2D0CF /* UserDeleteResponseDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDeleteResponseDto.swift; sourceTree = "<group>"; };
312+
DA0587F12A05D54100B72869 /* EditCourseRequestDto.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditCourseRequestDto.swift; sourceTree = "<group>"; };
313+
DA0587F32A05DEC000B72869 /* CourseEditVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseEditVC.swift; sourceTree = "<group>"; };
310314
DA20D846296697A600F1581F /* MyCourseSelectVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCourseSelectVC.swift; sourceTree = "<group>"; };
311315
DA20D848296697B400F1581F /* CourseUploadVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseUploadVC.swift; sourceTree = "<group>"; };
312316
DA20D84D2966A9B300F1581F /* CourseSearchVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CourseSearchVC.swift; sourceTree = "<group>"; };
@@ -441,6 +445,7 @@
441445
CE10063329680BFD00FD31FB /* CourseDetailDto */ = {
442446
isa = PBXGroup;
443447
children = (
448+
DA0587F02A05D52100B72869 /* RequestDto */,
444449
CE4942AB296FCD1000736701 /* ResponseDto */,
445450
);
446451
path = CourseDetailDto;
@@ -719,6 +724,7 @@
719724
isa = PBXGroup;
720725
children = (
721726
A3BC2F422966A93100198261 /* CourseDetailVC.swift */,
727+
DA0587F32A05DEC000B72869 /* CourseEditVC.swift */,
722728
);
723729
path = VC;
724730
sourceTree = "<group>";
@@ -1144,6 +1150,14 @@
11441150
path = VC;
11451151
sourceTree = "<group>";
11461152
};
1153+
DA0587F02A05D52100B72869 /* RequestDto */ = {
1154+
isa = PBXGroup;
1155+
children = (
1156+
DA0587F12A05D54100B72869 /* EditCourseRequestDto.swift */,
1157+
);
1158+
path = RequestDto;
1159+
sourceTree = "<group>";
1160+
};
11471161
DA97A029296DC2020086760E /* RequestDto */ = {
11481162
isa = PBXGroup;
11491163
children = (
@@ -1365,6 +1379,7 @@
13651379
A3F67AE2296D33AC001598A2 /* MyPageDto.swift in Sources */,
13661380
CE591EA1296D5EB5000FCBB3 /* PrivateCourseResponseDto.swift in Sources */,
13671381
A3BC2F3F2964706100198261 /* UploadedCourseInfoCVC.swift in Sources */,
1382+
DA0587F42A05DEC000B72869 /* CourseEditVC.swift in Sources */,
13681383
CE6655FE295D912300C64E12 /* calculateTopInset.swift in Sources */,
13691384
CEEC6B492961C5E200D00E1E /* SplashVC.swift in Sources */,
13701385
CE6655D0295D85FF00C64E12 /* CancelBag.swift in Sources */,
@@ -1423,6 +1438,7 @@
14231438
CE17F02D2961BBA100E1DED0 /* ColorLiterals.swift in Sources */,
14241439
CEC2A68E2962AF2C00160BF7 /* RNMarker.swift in Sources */,
14251440
CE6655D2295D862A00C64E12 /* Publisher+Driver.swift in Sources */,
1441+
DA0587F22A05D54100B72869 /* EditCourseRequestDto.swift in Sources */,
14261442
A3C2CACE29E313CC00EC525B /* SettingVC.swift in Sources */,
14271443
CE21C02E299E601700F62AF5 /* StampRouter.swift in Sources */,
14281444
CE6655E6295D887F00C64E12 /* UIStackView+.swift in Sources */,

Runnect-iOS/Runnect-iOS/Global/Literal/ImageLiterals.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ enum ImageLiterals {
4444
static var icLogoCircle: UIImage { .load(named: "ic_logo_circle") }
4545
static var icMore: UIImage { .load(named: "ic_more") }
4646
static var icPlus: UIImage { .load(named: "ic_plus") }
47+
static var icFrameEdit: UIImage {
48+
.load(named: "ic_frame_edit")
49+
}
4750

4851
// img
4952
static var imgBackground: UIImage { .load(named: "img_background") }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"images" : [
3+
{
4+
"filename" : "Frame 2064.png",
5+
"idiom" : "universal",
6+
"scale" : "1x"
7+
},
8+
{
9+
"filename" : "Frame [email protected]",
10+
"idiom" : "universal",
11+
"scale" : "2x"
12+
},
13+
{
14+
"filename" : "Frame [email protected]",
15+
"idiom" : "universal",
16+
"scale" : "3x"
17+
}
18+
],
19+
"info" : {
20+
"author" : "xcode",
21+
"version" : 1
22+
}
23+
}
1.03 KB
Loading
1.94 KB
Loading
2.78 KB
Loading

Runnect-iOS/Runnect-iOS/Global/UIComponents/RNAlertVC.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ final class RNAlertVC: UIViewController {
2525
private let descriptionLabel = UILabel().then {
2626
$0.font = .b4
2727
$0.textColor = .g2
28+
$0.numberOfLines = 0
29+
$0.textAlignment = .center
2830
}
2931

3032
private lazy var yesButton = UIButton(type: .custom).then {
@@ -105,7 +107,7 @@ extension RNAlertVC {
105107
make.centerX.equalToSuperview()
106108
make.centerY.equalToSuperview()
107109
make.leading.trailing.equalToSuperview().inset(30)
108-
make.height.equalTo(126)
110+
// make.height.equalTo(126)
109111
}
110112

111113
containerView.addSubviews(descriptionLabel, yesButton, noButton)
@@ -116,6 +118,7 @@ extension RNAlertVC {
116118
}
117119

118120
noButton.snp.makeConstraints { make in
121+
make.top.equalTo(descriptionLabel.snp.bottom).offset(20)
119122
make.leading.equalToSuperview().offset(16)
120123
make.trailing.equalTo(containerView.snp.centerX).offset(-4)
121124
make.height.equalTo(44)
@@ -124,6 +127,7 @@ extension RNAlertVC {
124127
}
125128

126129
yesButton.snp.makeConstraints { make in
130+
make.top.equalTo(noButton.snp.top)
127131
make.trailing.equalToSuperview().inset(16)
128132
make.leading.equalTo(containerView.snp.centerX).offset(4)
129133
make.height.equalTo(44)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
//
2+
// EditCourseReguestDto.swift
3+
// Runnect-iOS
4+
//
5+
// Created by YEONOO on 2023/05/06.
6+
//
7+
8+
import Foundation
9+
10+
// MARK: - EditCourseReguestDto
11+
12+
struct EditCourseRequestDto: Codable {
13+
let title, description: String
14+
}

Runnect-iOS/Runnect-iOS/Network/Dto/CourseDetailDto/ResponseDto/UploadedCourseDetailResponseDto.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ struct UploadUser: Codable {
2020
let nickname: String
2121
let level: Int
2222
let image: String
23+
let isNowUser: Bool?
2324
}

Runnect-iOS/Runnect-iOS/Network/Router/CourseRouter.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ enum CourseRouter {
1414
case getAllPrivateCourse
1515
case getPrivateCourseNotUploaded
1616
case getCourseDetail(courseId: Int)
17+
case deleteCourse(courseIdList: [Int])
1718
}
1819

1920
extension CourseRouter: TargetType {
@@ -35,6 +36,8 @@ extension CourseRouter: TargetType {
3536
return "/course/private/user"
3637
case .getCourseDetail(let courseId):
3738
return "/course/detail/\(courseId)"
39+
case .deleteCourse:
40+
return "/course"
3841
}
3942
}
4043

@@ -44,6 +47,8 @@ extension CourseRouter: TargetType {
4447
return .post
4548
case .getAllPrivateCourse, .getPrivateCourseNotUploaded, .getCourseDetail:
4649
return .get
50+
case .deleteCourse:
51+
return .put
4752
}
4853
}
4954

@@ -81,6 +86,8 @@ extension CourseRouter: TargetType {
8186
}
8287

8388
return .uploadMultipart(multipartFormData)
89+
case .deleteCourse(let courseIdList):
90+
return .requestParameters(parameters: ["courseIdList": courseIdList], encoding: JSONEncoding.default)
8491
case .getAllPrivateCourse, .getPrivateCourseNotUploaded, .getCourseDetail:
8592
return .requestPlain
8693
}

0 commit comments

Comments
 (0)