wip: Room list
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Created by sweetbread on 21.02.2025, 12:09
|
||||
* Created by sweetbread on 22.02.2025, 15:45
|
||||
* Copyright (c) 2025. All rights reserved.
|
||||
* Last modified 21.02.2025, 12:01
|
||||
* Last modified 22.02.2025, 15:45
|
||||
*/
|
||||
|
||||
package ru.risdeveau.pixeldragon.api
|
||||
@@ -18,10 +18,10 @@ import io.ktor.http.HttpStatusCode
|
||||
import io.ktor.http.contentType
|
||||
import org.json.JSONObject
|
||||
import ru.risdeveau.pixeldragon.accountData
|
||||
import ru.risdeveau.pixeldragon.baseUrl
|
||||
import ru.risdeveau.pixeldragon.client
|
||||
import ru.risdeveau.pixeldragon.initCheck
|
||||
import ru.risdeveau.pixeldragon.token
|
||||
import ru.risdeveau.pixeldragon.urlBase
|
||||
import splitties.init.appCtx
|
||||
|
||||
data class Me (val userId: String, val deviceId: String)
|
||||
@@ -30,7 +30,7 @@ data class Me (val userId: String, val deviceId: String)
|
||||
* This func is to validate the token
|
||||
*/
|
||||
suspend fun getMe(): Me? {
|
||||
val r = client.get("$urlBase/account/whoami") { bearerAuth(token) }
|
||||
val r = client.get("$baseUrl/account/whoami") { bearerAuth(token) }
|
||||
if (r.status != HttpStatusCode.OK) {
|
||||
Log.e("getMe", r.bodyAsText())
|
||||
return null
|
||||
|
||||
Reference in New Issue
Block a user