Skip to content

Commit

Permalink
Merge pull request #7 from stealmh/fix-StructTypo
Browse files Browse the repository at this point in the history
fix: Struct name 수정
  • Loading branch information
stealmh authored Jan 3, 2024
2 parents 93d201a + dda26ae commit 02da36f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Sources/CuteNetwork/Cute.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ open class Cute<EndPoint: EndPointType>: NSObject, NetworkRouter, URLSessionDele
//MARK: - Cute + Upload
extension Cute {
/// - petitUpload(_ root: EndPoint, image: UIImage, fileName: String, imageType: String, petitLogVisible: Bool) async throws -> Data 함수를 래핑
open func petitUpload<T: Decodable>(_ root: EndPoint, imageType: ImageInfomation, petitLogVisible: Bool = true) async throws -> T {
open func petitUpload<T: Decodable>(_ root: EndPoint, imageType: ImageInformation, petitLogVisible: Bool = true) async throws -> T {
do {
let result = try await petitUpload(root,
imageType: imageType,
Expand All @@ -103,7 +103,7 @@ extension Cute {
}
}
/// - petitUpload(_ route: EndPoint, image: UIImage, fileName: String, imageType: String, logAccess: Bool, completion: @escaping NetworkRouterCompletion) 함수를 래핑
open func petitUpload(_ root: EndPoint, imageType: ImageInfomation, petitLogVisible: Bool) async throws -> Data {
open func petitUpload(_ root: EndPoint, imageType: ImageInformation, petitLogVisible: Bool) async throws -> Data {
return try await withCheckedThrowingContinuation({ value in
petitUpload(root,
imageType: imageType,
Expand Down Expand Up @@ -132,7 +132,7 @@ extension Cute {
})
}
/// dataTask를 걸친 데이터 까지 넘겨주는 역할
open func petitUpload(_ route: EndPoint, imageType: ImageInfomation, logAccess: Bool, completion: @escaping NetworkRouterCompletion) {
open func petitUpload(_ route: EndPoint, imageType: ImageInformation, logAccess: Bool, completion: @escaping NetworkRouterCompletion) {
guard Reachability.isConnectedToNetwork() else {
completion(nil, nil, NetworkError.noConnectionToInternet)
return
Expand Down Expand Up @@ -176,7 +176,7 @@ extension Cute {
return request
}

fileprivate func createMultipartBody(_ boundary: String, _ imageType: ImageInfomation) -> Data {
fileprivate func createMultipartBody(_ boundary: String, _ imageType: ImageInformation) -> Data {
let boundaryPrefix = "--\(boundary)\r\n"
var uploadData = Data()
if let data = imageType.image.jpegData(compressionQuality: 0.8) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//
// ImageInfomation.swift
// ImageInformation.swift
//
//
// Created by mino on 2024/01/03.
//

import UIKit

public struct ImageInfomation {
public struct ImageInformation {
let imageName: String
let imageType: String
let image: UIImage
Expand Down

0 comments on commit 02da36f

Please sign in to comment.