fix token bug

This commit is contained in:
Li ZongYing 2024-02-11 10:26:59 +08:00
parent b7ec58ac5b
commit fe209183ea
1 changed files with 2 additions and 2 deletions

View File

@ -180,7 +180,7 @@ class Request {
yspTokenService.getInfo()
.enqueue(object : Callback<Info> {
override fun onResponse(call: Call<Info>, response: Response<Info>) {
if (response.isSuccessful) {
if (response.isSuccessful && response.body()?.data?.token != null) {
token = response.body()?.data?.token!!
Log.i(TAG, "info success $token")
val cookie =
@ -243,7 +243,7 @@ class Request {
yspTokenService.getInfo()
.enqueue(object : Callback<Info> {
override fun onResponse(call: Call<Info>, response: Response<Info>) {
if (response.isSuccessful) {
if (response.isSuccessful && response.body()?.data?.token != null) {
token = response.body()?.data?.token!!
Log.i(TAG, "info success $token")
} else {