Skip to content

Commit

Permalink
Merge pull request #447 from DeveloperAcademy-POSTECH/release/v1.5.0
Browse files Browse the repository at this point in the history
[CHORE] v1.5.0 출시에 따른 main 브랜치를 업데이트합니다.
  • Loading branch information
MMMIIIN authored Apr 23, 2023
2 parents 54233a1 + 00ced0a commit eda700d
Show file tree
Hide file tree
Showing 45 changed files with 1,479 additions and 1,313 deletions.
78 changes: 41 additions & 37 deletions Manito/Manito.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

18 changes: 14 additions & 4 deletions Manito/Manito/Global/Literal/TextLiteral.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,19 @@ enum TextLiteral {
static let mainViewControllerShowIdErrorAlertTitle: String = "해당 마니또 방의 정보를 불러오지 못했습니다."
static let mainViewControllerShowIdErrorAlertMessage: String = "해당 마니또 방으로 이동할 수 없습니다."

// MARK: - SelectManitteeViewController
static let selectManitteeViewControllerInformationText: String =
"""
레버를 스와이프해서
내 마니띠를 확인하세요.
"""

// MARK: - OpenManittoViewController
static let openManittoViewController: String = "당신의 마니또는?"

// MARK: - OpenManittoPopupViewController
static let openManittoPopupViewControllerOpenMentLabel: String = """
static let openManittoViewControllerTitle: String = "당신의 마니또는?"
static let openManittoViewControllerErrorTitle: String = "오류"
static let openManittoViewControllerErrorDescription = "마니또를 확인할 수 없습니다."
static let openManittoViewControllerPopupDescription: String =
"""
내일 함께 했던 추억이 열립니다.
마니또 방에서 확인해 보세요!
"""
Expand Down Expand Up @@ -127,6 +135,8 @@ enum TextLiteral {
쪽지함이 비었어요.
마니띠에게 쪽지를 보내볼까요?
"""
static let letterViewControllerErrorTitle: String = "오류"
static let letterViewControllerErrorDescription: String = "쪽지를 가져올 수 없습니다."

// MARK: - LetterImageViewController
static let letterImageViewControllerErrorTitle = "오류 발생"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
//
// UrlLiteral.swift
// URLLiteral.swift
// Manito
//
// Created by 이성호 on 2022/09/06.
//

import Foundation

enum UrlLiteral {
enum URLLiteral {

// MARK: - server url

static let developmentUrl: String = "http://43.200.81.247:8080/api/v1"
static let productionUrl: String = "https://dev.aenitto.shop/api/v1"
static let developmentUrl: String = "http://43.200.81.247:8080"
static let productionUrl: String = "https://dev.aenitto.shop"

// MARK: - notion url

Expand Down
269 changes: 6 additions & 263 deletions Manito/Manito/Global/Resource/Storyboards/DetailIng.storyboard

Large diffs are not rendered by default.

114 changes: 0 additions & 114 deletions Manito/Manito/Global/Resource/Storyboards/Interaction.storyboard

This file was deleted.

39 changes: 28 additions & 11 deletions Manito/Manito/Network/EndPoint/DetailDoneEndPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,30 @@

import Foundation

enum DetailDoneEndPoint: EndPointable {
enum DetailDoneEndPoint: URLRepresentable {
case requestWithFriend(roomId: String)
case requestMemory(roomId: String)
case requestDoneRoomInfo(roomId: String)
case requestExitRoom(roomId: String)
case requestDeleteRoom(roomId: String)

var path: String {
switch self {
case .requestWithFriend(let roomId):
return "/rooms/\(roomId)/participants"
case .requestMemory(let roomId):
return "/rooms/\(roomId)/memories"
case .requestDoneRoomInfo(let roomId):
return "/rooms/\(roomId)"
case .requestExitRoom(let roomId):
return "/rooms/\(roomId)/participants"
case .requestDeleteRoom(let roomId):
return "/rooms/\(roomId)"
}
}
}

extension DetailDoneEndPoint: EndPointable {
var requestTimeOut: Float {
return 20
}
Expand Down Expand Up @@ -48,26 +65,26 @@ enum DetailDoneEndPoint: EndPointable {
}
}

func getURL(baseURL: String) -> String {
var url: String {
switch self {
case .requestWithFriend(let roomId):
return "\(baseURL)/rooms/\(roomId))/participants"
return self[.requestWithFriend(roomId: roomId)]
case .requestMemory(let roomId):
return "\(baseURL)/rooms/\(roomId)/memories"
return self[.requestMemory(roomId: roomId)]
case .requestDoneRoomInfo(let roomId):
return "\(baseURL)/rooms/\(roomId)"
return self[.requestDoneRoomInfo(roomId: roomId)]
case .requestExitRoom(let roomId):
return "\(baseURL)/rooms/\(roomId)/participants"
return self[.requestExitRoom(roomId: roomId)]
case .requestDeleteRoom(let roomId):
return "\(baseURL)/rooms/\(roomId)"
return self[.requestDeleteRoom(roomId: roomId)]
}
}

func createRequest() -> NetworkRequest {
return NetworkRequest(url: getURL(baseURL: APIEnvironment.baseUrl),
reqBody: requestBody,
reqTimeout: requestTimeOut,
httpMethod: httpMethod
return NetworkRequest(url: self.url,
reqBody: self.requestBody,
reqTimeout: self.requestTimeOut,
httpMethod: self.httpMethod
)
}
}
27 changes: 19 additions & 8 deletions Manito/Manito/Network/EndPoint/DetailIngEndPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@

import Foundation

enum DetailIngEndPoint: EndPointable {
enum DetailIngEndPoint: URLRepresentable {
case requestWithFriend(roomId: String)
case requestStartingRoomInfo(roomId: String)

var path: String {
switch self {
case .requestWithFriend(let roomId):
return "/rooms/\(roomId)/participants"
case .requestStartingRoomInfo(let roomId):
return "/rooms/\(roomId)"
}
}
}

extension DetailIngEndPoint: EndPointable {
var requestTimeOut: Float {
return 20
}
Expand All @@ -33,20 +44,20 @@ enum DetailIngEndPoint: EndPointable {
}
}

func getURL(baseURL: String) -> String {
var url: String {
switch self {
case .requestWithFriend(let roomId):
return "\(baseURL)/rooms/\(roomId)/participants"
return self[.requestWithFriend(roomId: roomId)]
case .requestStartingRoomInfo(let roomId):
return "\(baseURL)/rooms/\(roomId)"
return self[.requestStartingRoomInfo(roomId: roomId)]
}
}

func createRequest() -> NetworkRequest {
return NetworkRequest(url: getURL(baseURL: APIEnvironment.baseUrl),
reqBody: requestBody,
reqTimeout: requestTimeOut,
httpMethod: httpMethod
return NetworkRequest(url: self.url,
reqBody: self.requestBody,
reqTimeout: self.requestTimeOut,
httpMethod: self.httpMethod
)
}
}
46 changes: 33 additions & 13 deletions Manito/Manito/Network/EndPoint/DetailWaitEndPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,33 @@

import Foundation

enum DetailWaitEndPoint: EndPointable {
enum DetailWaitEndPoint: URLRepresentable {
case fetchWithFriend(roomId: String)
case fetchWaitingRoomInfo(roomId: String)
case patchStartManitto(roomId: String)
case putRoomInfo(roomId: String, roomInfo: RoomDTO)
case deleteRoom(roomId: String)
case deleteLeaveRoom(roomId: String)

var path: String {
switch self {
case .fetchWithFriend(let roomId):
return "/rooms/\(roomId)/participants"
case .fetchWaitingRoomInfo(let roomId):
return "/rooms/\(roomId)"
case .patchStartManitto(let roomId):
return "/rooms/\(roomId)/state"
case .putRoomInfo(let roomId, _):
return "/rooms/\(roomId)"
case .deleteRoom(let roomId):
return "/rooms/\(roomId)"
case .deleteLeaveRoom(let roomId):
return "/rooms/\(roomId)/participants"
}
}
}

extension DetailWaitEndPoint: EndPointable {
var requestTimeOut: Float {
return 20
}
Expand Down Expand Up @@ -57,32 +76,33 @@ enum DetailWaitEndPoint: EndPointable {
}
}

func getURL(baseURL: String) -> String {
var url: String {
switch self {
case .fetchWithFriend(let roomId):
return "\(baseURL)/rooms/\(roomId)/participants"
return self[.fetchWithFriend(roomId: roomId)]
case .fetchWaitingRoomInfo(let roomId):
return "\(baseURL)/rooms/\(roomId)"
return self[.fetchWaitingRoomInfo(roomId: roomId)]
case .patchStartManitto(let roomId):
return "\(baseURL)/rooms/\(roomId)/state"
case .putRoomInfo(let roomId, _):
return "\(baseURL)/rooms/\(roomId)"
return self[.patchStartManitto(roomId: roomId)]
case .putRoomInfo(let roomId, let roomInfo):
return self[.putRoomInfo(roomId: roomId, roomInfo: roomInfo)]
case .deleteRoom(let roomId):
return "\(baseURL)/rooms/\(roomId)"
return self[.deleteRoom(roomId: roomId)]
case .deleteLeaveRoom(let roomId):
return "\(baseURL)/rooms/\(roomId)/participants"
return self[.deleteLeaveRoom(roomId: roomId)]
}
}

func createRequest() -> NetworkRequest {
var headers: [String: String] = [:]
headers["Content-Type"] = "application/json"
headers["authorization"] = "Bearer \(UserDefaultStorage.accessToken)"
return NetworkRequest(url: getURL(baseURL: APIEnvironment.baseUrl),

return NetworkRequest(url: self.url,
headers: headers,
reqBody: requestBody,
reqTimeout: requestTimeOut,
httpMethod: httpMethod
reqBody: self.requestBody,
reqTimeout: self.requestTimeOut,
httpMethod: self.httpMethod
)
}
}
Loading

0 comments on commit eda700d

Please sign in to comment.