更新代码
This commit is contained in:
@@ -4,6 +4,7 @@ import com.aiosman.riderpro.data.api.ApiClient
|
||||
import com.aiosman.riderpro.data.api.ChangePasswordRequestBody
|
||||
import com.aiosman.riderpro.data.api.GoogleRegisterRequestBody
|
||||
import com.aiosman.riderpro.data.api.LoginUserRequestBody
|
||||
import com.aiosman.riderpro.data.api.RegisterMessageChannelRequestBody
|
||||
import com.aiosman.riderpro.data.api.RegisterRequestBody
|
||||
import com.aiosman.riderpro.data.api.UpdateNoticeRequestBody
|
||||
import com.aiosman.riderpro.entity.AccountFavouriteEntity
|
||||
@@ -300,6 +301,8 @@ interface AccountService {
|
||||
* @param payload 通知信息
|
||||
*/
|
||||
suspend fun updateNotice(payload: UpdateNoticeRequestBody)
|
||||
|
||||
suspend fun registerMessageChannel(client:String,identifier:String)
|
||||
}
|
||||
|
||||
class AccountServiceImpl : AccountService {
|
||||
@@ -400,4 +403,8 @@ class AccountServiceImpl : AccountService {
|
||||
ApiClient.api.updateNoticeInfo(payload)
|
||||
}
|
||||
|
||||
override suspend fun registerMessageChannel(client: String, identifier: String) {
|
||||
ApiClient.api.registerMessageChannel(RegisterMessageChannelRequestBody(client,identifier))
|
||||
}
|
||||
|
||||
}
|
||||
@@ -79,6 +79,12 @@ data class UpdateNoticeRequestBody(
|
||||
val lastLookFavouriteTime: String? = null
|
||||
)
|
||||
|
||||
data class RegisterMessageChannelRequestBody(
|
||||
@SerializedName("client")
|
||||
val client: String,
|
||||
@SerializedName("identifier")
|
||||
val identifier: String,
|
||||
)
|
||||
interface RiderProAPI {
|
||||
@POST("register")
|
||||
suspend fun register(@Body body: RegisterRequestBody): Response<Unit>
|
||||
@@ -211,6 +217,11 @@ interface RiderProAPI {
|
||||
@Body body: UpdateNoticeRequestBody
|
||||
): Response<Unit>
|
||||
|
||||
@POST("account/my/messaging")
|
||||
suspend fun registerMessageChannel(
|
||||
@Body body: RegisterMessageChannelRequestBody
|
||||
): Response<Unit>
|
||||
|
||||
|
||||
@GET("profile/{id}")
|
||||
suspend fun getAccountProfileById(
|
||||
|
||||
Reference in New Issue
Block a user