-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fa4edb
commit ccc9a49
Showing
9 changed files
with
124 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 0 additions & 8 deletions
8
GEON-PPANG-iOS/Data/Network/DataMapping/RequestDTO/DummyRequestDTO.swift
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
GEON-PPANG-iOS/Data/Network/DataMapping/RequestDTO/Member/PostFilterRequestDTO.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// | ||
// PostFilterRequestDTO.swift | ||
// GEON-PPANG-iOS | ||
// | ||
// Created by 이성민 on 6/27/24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct PostFilterRequestDTO: Encodable { | ||
let mainPurpose: String | ||
let breadTypeList: [BakeryType] | ||
let nutrientTypeList: [NutrientType] | ||
} |
8 changes: 0 additions & 8 deletions
8
GEON-PPANG-iOS/Data/Network/DataMapping/ResponseDTO/DummyResDTO.swift
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
GEON-PPANG-iOS/Data/Network/DataMapping/ResponseDTO/Member/PostFilterResponseDTO.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// PostFilterResponseDTO.swift | ||
// GEON-PPANG-iOS | ||
// | ||
// Created by 이성민 on 6/27/24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct PostFilterResponseDTO: Decodable { | ||
let memberId: Int | ||
let mainPurpose: String | ||
let nickname: String | ||
let breadTypeList: [BreadType] | ||
let nutrientTypeList: [NutrientType] | ||
} | ||
|
||
extension PostFilterResponseDTO { | ||
struct BreadType: Decodable { | ||
let breadTypeId: Int | ||
} | ||
|
||
struct NutrientType: Decodable { | ||
let nutrientTypeId: Int | ||
} | ||
} | ||
|
||
extension PostFilterResponseDTO { | ||
func toDomain() { | ||
|
||
} | ||
} |
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
GEON-PPANG-iOS/Data/Network/Endpoints/MemberEndpoint.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// | ||
// MemberEndpoint.swift | ||
// GEON-PPANG-iOS | ||
// | ||
// Created by 이성민 on 6/27/24. | ||
// | ||
|
||
import Foundation | ||
|
||
import GBNetwork | ||
|
||
enum MemberEndpoint { | ||
case postFilter(body: PostFilterRequestDTO) | ||
} | ||
|
||
extension MemberEndpoint: RequestType { | ||
var baseURL: String { | ||
return "" | ||
} | ||
|
||
var path: String { | ||
switch self { | ||
case .postFilter: "/member/types" | ||
} | ||
} | ||
|
||
var method: GBNetwork.HTTPMethod { | ||
switch self { | ||
case .postFilter: .POST | ||
} | ||
} | ||
|
||
var task: GBNetwork.HTTPTask { | ||
switch self { | ||
case let .postFilter(body): .requestEncodable(body) | ||
} | ||
} | ||
|
||
var headers: GBNetwork.HTTPHeader { | ||
switch self { | ||
case .postFilter: | ||
.init(headers: [ | ||
.contentType(value: "application/json"), | ||
.accessToken(value: "") | ||
]) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
import Foundation | ||
|
||
enum BakeryType { | ||
enum BakeryType: Codable { | ||
case 글루텐프리 | ||
case 비건빵 | ||
case 넛프리 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters