完成登出
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.aiosman.riderpro.data
|
||||
|
||||
import com.aiosman.riderpro.AppState
|
||||
import com.aiosman.riderpro.data.api.ApiClient
|
||||
import com.aiosman.riderpro.data.api.ChangePasswordRequestBody
|
||||
import com.aiosman.riderpro.data.api.GoogleRegisterRequestBody
|
||||
@@ -366,6 +367,7 @@ class AccountServiceImpl : AccountService {
|
||||
override suspend fun getMyAccount(): UserAuth {
|
||||
val resp = ApiClient.api.checkToken()
|
||||
val body = resp.body() ?: throw ServiceException("Failed to get account")
|
||||
AppState.UserId = body.id
|
||||
return UserAuth(body.id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user