fix: 채팅방 리스트 API URL 수정

- /api/chat/talk/rooms -> /api/chat/room/list
This commit is contained in:
2025-08-11 11:34:23 +09:00
parent 18b61ab74f
commit 80c593bc11
3 changed files with 3 additions and 13 deletions

View File

@@ -6,8 +6,8 @@ import retrofit2.http.GET
import retrofit2.http.Header
interface TalkApi {
@GET("/api/chat/talk/rooms")
@GET("/api/chat/room/list")
fun getTalkRooms(
@Header("Authorization") authHeader: String
): Single<ApiResponse<TalkRoomResponse>>
): Single<ApiResponse<List<TalkRoom>>>
}

View File

@@ -1,10 +0,0 @@
package kr.co.vividnext.sodalive.chat.talk
import androidx.annotation.Keep
import com.google.gson.annotations.SerializedName
@Keep
data class TalkRoomResponse(
@SerializedName("totalCount") val totalCount: Int,
@SerializedName("items") val items: List<TalkRoom>
)

View File

@@ -30,7 +30,7 @@ class TalkTabViewModel(private val repository: TalkTabRepository) : BaseViewMode
{ response ->
_isLoading.value = false
if (response.success) {
_talkRooms.value = response.data?.items ?: emptyList()
_talkRooms.value = response.data ?: emptyList()
} else {
_toastLiveData.value =
response.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."