Skip to content
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

[FIX] #171 - 명함생성 미리보기 뷰 안내문구 추가 및 서버 service 에 토큰 추가 #172

Merged
merged 2 commits into from
Dec 20, 2021
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
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina5_9" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19519"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
Expand Down Expand Up @@ -63,8 +63,10 @@
<constraint firstItem="JTT-Cr-gmG" firstAttribute="centerY" secondItem="uDr-em-N5O" secondAttribute="centerY" id="lyV-T8-gvk"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="한 번 만든 명함은 수정할 수 없습니다." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cgr-Tn-nVH">
<rect key="frame" x="61.666666666666657" y="670" width="251.99999999999997" height="20.333333333333371"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cgr-Tn-nVH">
<rect key="frame" x="41.666666666666657" y="670" width="291.66666666666674" height="40.666666666666629"/>
<string key="text">명함을 좌우로 넘겨 앞/뒷면을 확인해보세요.
한 번 만든 명함은 수정할 수 없습니다.</string>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import Foundation

// MARK: - CardCreation
struct CardCreationRequest: Codable {
let userID: String
let frontCard: FrontCardDataModel
let backCard: BackCardDataModel
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ extension CardService: TargetType {

var multiPartData: [Moya.MultipartFormData] = []

let userIDData = request.userID.data(using: .utf8) ?? Data()
multiPartData.append(MultipartFormData(provider: .data(userIDData), name: "card.userId"))
let defaultImageData = Int(request.frontCard.defaultImage).description.data(using: .utf8) ?? Data()
multiPartData.append(MultipartFormData(provider: .data(defaultImageData), name: "card.defaultImage"))
let titleData = request.frontCard.title.data(using: .utf8) ?? Data()
Expand Down Expand Up @@ -114,7 +112,7 @@ extension CardService: TargetType {
case .cardDetailFetch, .cardListFetch, .cardDelete:
return .none
case .cardCreation:
return ["Content-Type": "multipart/form-data"]
return Const.Header.basicHeader
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

화긴이욥 ^__^

case .cardListEdit:
return ["Content-Type": "application/json"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class CardCreationPreviewViewController: UIViewController {
}
@IBAction func touchCompleteButton(_ sender: Any) {
guard let frontCardDataModel = frontCardDataModel, let backCardDataModel = backCardDataModel else { return }
cardCreationRequest = CardCreationRequest(userID: "", frontCard: frontCardDataModel, backCard: backCardDataModel)
cardCreationRequest = CardCreationRequest(frontCard: frontCardDataModel, backCard: backCardDataModel)
guard let cardCreationRequest = cardCreationRequest,
let cardBackgroundImage = cardBackgroundImage else { return }

Expand Down Expand Up @@ -182,6 +182,7 @@ extension CardCreationPreviewViewController {
switch response {
case .success:
print("cardCreationWithAPI - success")
self.dismiss(animated: true, completion: nil)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

case .requestErr(let message):
print("cardCreationWithAPI - requestErr: \(message)")
case .pathErr:
Expand Down