fix(chat-room): 채팅방
- 쿼터 상태 조회, 쿼터 구매 API URL 변경
This commit is contained in:
@@ -51,12 +51,12 @@ class ChatRoomRepository {
|
||||
}
|
||||
|
||||
/** 쿼터 상태 조회 */
|
||||
func getChatQuotaStatus() -> AnyPublisher<Response, MoyaError> {
|
||||
return talkApi.requestPublisher(.getChatQuotaStatus)
|
||||
func getChatQuotaStatus(roomId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||
return talkApi.requestPublisher(.getChatQuotaStatus(roomId: roomId))
|
||||
}
|
||||
|
||||
func purchaseChatQuota() -> AnyPublisher<Response, MoyaError> {
|
||||
return talkApi.requestPublisher(.purchaseChatQuota(request: ChatQuotaPurchaseRequest()))
|
||||
func purchaseChatQuota(roomId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||
return talkApi.requestPublisher(.purchaseChatQuota(roomId: roomId, request: ChatQuotaPurchaseRequest()))
|
||||
}
|
||||
|
||||
func resetChatRoom(roomId: Int) -> AnyPublisher<Response, MoyaError> {
|
||||
|
||||
@@ -277,7 +277,7 @@ final class ChatRoomViewModel: ObservableObject {
|
||||
func purchaseChatQuota() {
|
||||
isLoading = true
|
||||
|
||||
repository.purchaseChatQuota()
|
||||
repository.purchaseChatQuota(roomId: roomId)
|
||||
.sink { result in
|
||||
switch result {
|
||||
case .finished:
|
||||
@@ -402,7 +402,7 @@ final class ChatRoomViewModel: ObservableObject {
|
||||
private func checkQuotaStatus() {
|
||||
isLoading = true
|
||||
|
||||
repository.getChatQuotaStatus()
|
||||
repository.getChatQuotaStatus(roomId: roomId)
|
||||
.sink { result in
|
||||
switch result {
|
||||
case .finished:
|
||||
|
||||
Reference in New Issue
Block a user