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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Tuist/Dependencies
.DS_Store
.AppleDouble
.LSOverride
*.xcconfig

# Icon must end with two \r
Icon
Expand Down
11 changes: 10 additions & 1 deletion Projects/App/Support/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,28 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.5.1</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CloudTypeBaseURL</key>
<string>$(CloudTypeBaseURL)</string>
<key>FirebaseAppDelegateProxyEnabled</key>
<true/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>Localization native development region</key>
<string>Korea</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>QR 스캔을 위해 카메라를 허용해주세요.</string>
<key>SERVER_HOST</key>
<string> ${SERVER_HOST}</string>
<key>SchoolBaseURL</key>
<string>$(SchoolBaseURL)</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public final class OutingViewController: BaseViewController {
searchController.searchBar.placeholder = "학생 검색"
searchController.searchResultsUpdater = self
}

private func setupCollectionView() {
self.outingListCollectionView.dataSource = self
self.outingListCollectionView.delegate = self
Expand Down
14 changes: 0 additions & 14 deletions Projects/Service/Sources/General/BaseURL.swift

This file was deleted.

14 changes: 9 additions & 5 deletions Projects/Service/Sources/Services/Account/AccountServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,21 @@ public enum AccountServices {

extension AccountServices: TargetType {
public var baseURL: URL {
return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2/account")!
guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String,
let url = URL(string: urlString) else {
fatalError("AccountAPIㅣURL을 불러올 수 없습니다.")
}
return url
}

public var path: String {
switch self {
case .newPassword:
return "/new-password"
return "/account/new-password"
case .changPassword:
return "/change-password"
return "/account/change-password"
case .withdraw(let password, _):
return "/withdraw/\(password)"
return "/account/withdraw/\(password)"
}
}

Expand Down
8 changes: 6 additions & 2 deletions Projects/Service/Sources/Services/Auth/AuthServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@ public enum AuthServices {

extension AuthServices: TargetType {
public var baseURL: URL {
return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")!
guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String,
let url = URL(string: urlString) else {
fatalError("AuthAPIㅣURL을 불러올 수 없습니다.")
}
return url
}

public var path: String {
switch self {
case .signUp:
Expand Down
8 changes: 6 additions & 2 deletions Projects/Service/Sources/Services/Late/LateService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ public enum LateService {

extension LateService: TargetType {
public var baseURL: URL {
return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")!
guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String,
let url = URL(string: urlString) else {
fatalError("LateAPIㅣURL을 불러올 수 없습니다.")
}
return url
}

public var path: String {
switch self {
case .lateRank:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ public enum NotificationServices {

extension NotificationServices: TargetType {
public var baseURL: URL {
return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2/notification/token")!
guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String,
let url = URL(string: urlString) else {
fatalError("NotificationAPIㅣURL을 불러올 수 없습니다.")
}
return url
}

public var path: String {
Expand Down
8 changes: 6 additions & 2 deletions Projects/Service/Sources/Services/Outing/OutingServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ public enum OutingServices {

extension OutingServices: TargetType {
public var baseURL: URL {
return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")!
guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String,
let url = URL(string: urlString) else {
fatalError("OutingAPIㅣURL을 불러올 수 없습니다.")
}
return url
}

public var path: String {
switch self {
case .outing(let outingUUID, _):
Expand Down
16 changes: 10 additions & 6 deletions Projects/Service/Sources/Services/Profile/ProfileServices.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,23 @@ struct ProfileImageResponse: Codable {

extension ProfileServices: TargetType {
public var baseURL: URL {
return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2/account")!
guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String,
let url = URL(string: urlString) else {
fatalError("ProfileAPIㅣURL을 불러올 수 없습니다.")
}
return url
}

public var path: String {
switch self {
case .getProfile:
return "/profile"
return "/account/profile"
case .submit:
return "/image"
return "/account/image"
case .update:
return "/image"
return "/account/image"
case .delete:
return ""
return "/account"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ public enum StudentCouncilServices {

extension StudentCouncilServices: TargetType {
public var baseURL: URL {
return URL(string: "https://port-0-goms-backend-v2-12fhqa2bln49rbi0.sel5.cloudtype.app/api/v2")!
guard let urlString = Bundle.main.infoDictionary?["SchoolBaseURL"] as? String,
let url = URL(string: urlString) else {
fatalError("StudentCouncilㅣURL을 불러올 수 없습니다.")
}
return url
}

public var path: String {
switch self {
case .makeQRCode:
Expand Down
Loading