fix: 채팅방 리스트 API URL 수정
- /api/chat/talk/rooms -> /api/chat/room/list
This commit is contained in:
		@@ -6,8 +6,8 @@ import retrofit2.http.GET
 | 
				
			|||||||
import retrofit2.http.Header
 | 
					import retrofit2.http.Header
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface TalkApi {
 | 
					interface TalkApi {
 | 
				
			||||||
    @GET("/api/chat/talk/rooms")
 | 
					    @GET("/api/chat/room/list")
 | 
				
			||||||
    fun getTalkRooms(
 | 
					    fun getTalkRooms(
 | 
				
			||||||
        @Header("Authorization") authHeader: String
 | 
					        @Header("Authorization") authHeader: String
 | 
				
			||||||
    ): Single<ApiResponse<TalkRoomResponse>>
 | 
					    ): Single<ApiResponse<List<TalkRoom>>>
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -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>
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
@@ -30,7 +30,7 @@ class TalkTabViewModel(private val repository: TalkTabRepository) : BaseViewMode
 | 
				
			|||||||
                    { response ->
 | 
					                    { response ->
 | 
				
			||||||
                        _isLoading.value = false
 | 
					                        _isLoading.value = false
 | 
				
			||||||
                        if (response.success) {
 | 
					                        if (response.success) {
 | 
				
			||||||
                            _talkRooms.value = response.data?.items ?: emptyList()
 | 
					                            _talkRooms.value = response.data ?: emptyList()
 | 
				
			||||||
                        } else {
 | 
					                        } else {
 | 
				
			||||||
                            _toastLiveData.value =
 | 
					                            _toastLiveData.value =
 | 
				
			||||||
                                response.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
 | 
					                                response.message ?: "알 수 없는 오류가 발생했습니다. 다시 시도해 주세요."
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user