-
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
Showing
7 changed files
with
135 additions
and
46 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
22 changes: 22 additions & 0 deletions
22
Gongbaek_iOS/Gongbaek_iOS/Network/Service/DTO/Filling/PostMeetingRequestDTO.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,22 @@ | ||
// | ||
// PostMeetingRequestDTO.swift | ||
// Gongbaek_iOS | ||
// | ||
// Created by 김민서 on 1/22/25. | ||
// | ||
|
||
import Foundation | ||
|
||
struct PostMeetingRequestDTO: Codable { | ||
let groupType: String | ||
let weekDate: String | ||
let weekDay: String | ||
let startTime: Double | ||
let endTime: Double | ||
let category: String | ||
let coverImg: Int | ||
let location: String | ||
let maxPeopleCount: Int | ||
let groupTitle: String | ||
let introduction: String | ||
} |
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
49 changes: 49 additions & 0 deletions
49
Gongbaek_iOS/Gongbaek_iOS/Network/Service/TargetType/FillingTargetType.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,49 @@ | ||
// | ||
// FillingTargetType.swift | ||
// Gongbaek_iOS | ||
// | ||
// Created by 김민서 on 1/22/25. | ||
// | ||
|
||
import Moya | ||
|
||
enum FillingTargetType { | ||
case postMeeting(data: AddMeetingModel) | ||
case getTimeTable | ||
} | ||
|
||
extension FillingTargetType: BaseTargetType { | ||
var headers: Parameters? { | ||
switch self { | ||
case .postMeeting, .getTimeTable: | ||
return APIConstants.hasTokenHeader | ||
} | ||
} | ||
|
||
var path: String { | ||
switch self { | ||
case .postMeeting: | ||
return "/api/v1/gongbaek" | ||
case .getTimeTable: | ||
return "/api/v1/my/timeTable" | ||
} | ||
} | ||
|
||
var method: Moya.Method { | ||
switch self { | ||
case .postMeeting: | ||
return .post | ||
case .getTimeTable: | ||
return .get | ||
} | ||
} | ||
|
||
var task: Moya.Task { | ||
switch self { | ||
case .postMeeting(let data): | ||
return .requestJSONEncodable(data) | ||
case .getTimeTable: | ||
return .requestPlain | ||
} | ||
} | ||
} |
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
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
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