diff --git a/Projects/Features/MyPageFeature/Sources/MyPage/MyPageView.swift b/Projects/Features/MyPageFeature/Sources/MyPage/MyPageView.swift index f428feff..f4680517 100644 --- a/Projects/Features/MyPageFeature/Sources/MyPage/MyPageView.swift +++ b/Projects/Features/MyPageFeature/Sources/MyPage/MyPageView.swift @@ -141,7 +141,8 @@ struct MyPageView: View { } label: { myPageOptionRowCardView(title: "비밀번호 변경") .dmsFont(.body(.body2), color: .GrayScale.gray6) - .cornerRadius(10, corners: [ appState.features.pointService ? [.bottomLeft, .bottomRight] : .allCorners ]) + .cornerRadius(10, corners: appState.features.pointService + ? [.bottomLeft, .bottomRight] : .allCorners) } } diff --git a/Projects/Features/StudyRoomFeature/Sources/StudyRoomDetail/StudyRoomDetailViewModel.swift b/Projects/Features/StudyRoomFeature/Sources/StudyRoomDetail/StudyRoomDetailViewModel.swift index bf7b0669..dcf1f150 100644 --- a/Projects/Features/StudyRoomFeature/Sources/StudyRoomDetail/StudyRoomDetailViewModel.swift +++ b/Projects/Features/StudyRoomFeature/Sources/StudyRoomDetail/StudyRoomDetailViewModel.swift @@ -49,7 +49,7 @@ final class StudyRoomDetailViewModel: BaseViewModel { func fetchSeatType() { addCancellable( - fetchSeatTypesUseCase.execute() + fetchSeatTypesUseCase.execute(studyroomID: studyRoomEntity.id) ) { [weak self] seatTypes in self?.seatTypes = seatTypes } diff --git a/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift b/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift index b3071147..38ca4e01 100644 --- a/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift +++ b/Projects/Services/APIKit/Sources/StudyRoomsAPI.swift @@ -5,7 +5,7 @@ import Moya public enum StudyRoomsAPI { case fetchStudyAvailableTime - case fetchSeatTypes + case fetchSeatTypes(studyroomID: String) case fetchStudyRoomList(timeSlot: String?) case fetchDetailStudyRoom(roomID: String, timeSlot: String) case fetchMyStudyRoomApplicationItems @@ -64,6 +64,14 @@ extension StudyRoomsAPI: DmsAPI { public var task: Moya.Task { switch self { + case let .fetchSeatTypes(studyroomID): + return .requestParameters( + parameters: [ + "study_room_id": studyroomID + ], + encoding: URLEncoding.queryString + ) + case let .fetchStudyRoomList(timeSlot): return .requestParameters( parameters: [ diff --git a/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift b/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift index 068bacd1..775c9fbe 100644 --- a/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift +++ b/Projects/Services/DataModule/Sources/StudyRooms/Repositories/Impl/StudyRoomsRepositoryImpl.swift @@ -15,8 +15,8 @@ public struct StudyRoomsRepositoryImpl: StudyRoomsRepository { remoteStudyRoomsDataSource.fetchStudyAvailableTime() } - public func fetchSeatTypes() -> AnyPublisher<[SeatTypeEntity], DmsError> { - remoteStudyRoomsDataSource.fetchSeatTypes() + public func fetchSeatTypes(studyroomID: String) -> AnyPublisher<[SeatTypeEntity], DmsError> { + remoteStudyRoomsDataSource.fetchSeatTypes(studyroomID: studyroomID) } public func fetchStudyRoomList(timeSlot: String?) -> AnyPublisher<[StudyRoomEntity], DmsError> { diff --git a/Projects/Services/DataModule/Sources/StudyRooms/UseCases/Impl/FetchSeatTypesUseCaseImpl.swift b/Projects/Services/DataModule/Sources/StudyRooms/UseCases/Impl/FetchSeatTypesUseCaseImpl.swift index 9d313f6d..dc182361 100644 --- a/Projects/Services/DataModule/Sources/StudyRooms/UseCases/Impl/FetchSeatTypesUseCaseImpl.swift +++ b/Projects/Services/DataModule/Sources/StudyRooms/UseCases/Impl/FetchSeatTypesUseCaseImpl.swift @@ -10,7 +10,7 @@ public struct FetchSeatTypesUseCaseImpl: FetchSeatTypesUseCase { self.studyRoomsRepository = studyRoomsRepository } - public func execute() -> AnyPublisher<[SeatTypeEntity], DmsError> { - studyRoomsRepository.fetchSeatTypes() + public func execute(studyroomID: String) -> AnyPublisher<[SeatTypeEntity], DmsError> { + studyRoomsRepository.fetchSeatTypes(studyroomID: studyroomID) } } diff --git a/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift b/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift index d3a6131d..cb97dab5 100644 --- a/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift +++ b/Projects/Services/DomainModule/Sources/StudyRooms/Repository/StudyRoomsRepository.swift @@ -4,7 +4,7 @@ import ErrorModule public protocol StudyRoomsRepository { func fetchStudyAvailableTime() -> AnyPublisher - func fetchSeatTypes() -> AnyPublisher<[SeatTypeEntity], DmsError> + func fetchSeatTypes(studyroomID: String) -> AnyPublisher<[SeatTypeEntity], DmsError> func fetchStudyRoomList(timeSlot: String?) -> AnyPublisher<[StudyRoomEntity], DmsError> func fetchDetailStudyRoom(roomID: String, timeSlot: String) -> AnyPublisher func applyStudyRoomSeat(seatID: String, timeSlot: String) -> AnyPublisher diff --git a/Projects/Services/DomainModule/Sources/StudyRooms/UseCases/FetchSeatTypesUseCase.swift b/Projects/Services/DomainModule/Sources/StudyRooms/UseCases/FetchSeatTypesUseCase.swift index dbb1600b..2b328c08 100644 --- a/Projects/Services/DomainModule/Sources/StudyRooms/UseCases/FetchSeatTypesUseCase.swift +++ b/Projects/Services/DomainModule/Sources/StudyRooms/UseCases/FetchSeatTypesUseCase.swift @@ -3,5 +3,5 @@ import DataMappingModule import ErrorModule public protocol FetchSeatTypesUseCase { - func execute() -> AnyPublisher<[SeatTypeEntity], DmsError> + func execute(studyroomID: String) -> AnyPublisher<[SeatTypeEntity], DmsError> } diff --git a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift index 79eb5c15..cf4e3939 100644 --- a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift +++ b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/Impl/RemoteStudyRoomsDataSourceImpl.swift @@ -23,8 +23,8 @@ public final class RemoteStudyRoomsDataSourceImpl: BaseRemoteDataSource AnyPublisher<[SeatTypeEntity], DmsError> { - request(.fetchSeatTypes, dto: FetchSeatTypesResponseDTO.self) + public func fetchSeatTypes(studyroomID: String) -> AnyPublisher<[SeatTypeEntity], DmsError> { + request(.fetchSeatTypes(studyroomID: studyroomID), dto: FetchSeatTypesResponseDTO.self) .map { $0.toDomain() } .eraseToAnyPublisher() } diff --git a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift index d1481242..a7b01ba5 100644 --- a/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift +++ b/Projects/Services/NetworkModule/Sources/StudyRooms/Remote/RemoteStudyRoomsDataSource.swift @@ -7,7 +7,7 @@ import Foundation public protocol RemoteStudyRoomsDataSource { func fetchStudyAvailableTime() -> AnyPublisher - func fetchSeatTypes() -> AnyPublisher<[SeatTypeEntity], DmsError> + func fetchSeatTypes(studyroomID: String) -> AnyPublisher<[SeatTypeEntity], DmsError> func fetchStudyRoomList(timeSlot: String?) -> AnyPublisher<[StudyRoomEntity], DmsError> func fetchDetailStudyRoom(roomID: String, timeSlot: String) -> AnyPublisher func applyStudyRoomSeat(seatID: String, timeSlot: String) -> AnyPublisher