更新聊天

This commit is contained in:
2024-09-27 21:11:48 +08:00
parent 55753d06cb
commit 24c0f57926
7 changed files with 326 additions and 26 deletions

View File

@@ -48,6 +48,8 @@ interface UserService {
followingId: Int? = null
): ListContainer<AccountProfileEntity>
suspend fun getUserProfileByTrtcUserId(id: String):AccountProfileEntity
}
class UserServiceImpl : UserService {
@@ -89,4 +91,10 @@ class UserServiceImpl : UserService {
pageSize = body.pageSize,
)
}
override suspend fun getUserProfileByTrtcUserId(id: String): AccountProfileEntity {
val resp = ApiClient.api.getAccountProfileByTrtcUserId(id)
val body = resp.body() ?: throw ServiceException("Failed to get account")
return body.data.toAccountProfileEntity()
}
}

View File

@@ -265,6 +265,11 @@ interface RiderProAPI {
@Path("id") id: Int
): Response<DataContainer<AccountProfile>>
@GET("profile/trtc/{id}")
suspend fun getAccountProfileByTrtcUserId(
@Path("id") id: String
): Response<DataContainer<AccountProfile>>
@POST("user/{id}/follow")
suspend fun followUser(
@Path("id") id: Int