diff --git a/core/network/src/main/java/com/stslex/aproselection/core/network/clients/user/UserNetworkClientImpl.kt b/core/network/src/main/java/com/stslex/aproselection/core/network/clients/user/UserNetworkClientImpl.kt index 86bc5c8..c675234 100644 --- a/core/network/src/main/java/com/stslex/aproselection/core/network/clients/user/UserNetworkClientImpl.kt +++ b/core/network/src/main/java/com/stslex/aproselection/core/network/clients/user/UserNetworkClientImpl.kt @@ -3,12 +3,12 @@ package com.stslex.aproselection.core.network.clients.user import com.stslex.aproselection.core.network.client.NetworkClient import com.stslex.aproselection.core.network.clients.user.model.UpdateUserInfoBody import com.stslex.aproselection.core.network.clients.user.model.UserResponse +import com.stslex.aproselection.core.network.model.PagingRequest import io.ktor.client.call.body import io.ktor.client.request.get import io.ktor.client.request.post import io.ktor.client.request.setBody import io.ktor.http.appendPathSegments -import io.ktor.util.AttributeKey import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext @@ -22,10 +22,12 @@ class UserNetworkClientImpl( ): List = withContext(Dispatchers.IO) { networkClient.apiClient.get { url.appendPathSegments("user", "list") - setAttributes { - put(AttributeKey("page_size"), pageSize) - put(AttributeKey("page_number"), page) - } + setBody( + PagingRequest( + pageSize = pageSize, + pageNumber = page + ) + ) }.body() }