fix: Migrate to /identity/accounts/prelogin endpoint
This commit is contained in:
parent
8087e5b73c
commit
a6bc90ccdb
|
@ -88,8 +88,6 @@ value class ServerEnvApi @Deprecated("Use the [ServerEnv.api] property instead."
|
|||
value class Accounts(
|
||||
private val url: String,
|
||||
) {
|
||||
val prelogin get() = url + "prelogin"
|
||||
|
||||
/**
|
||||
* Send a PUT request to change the avatar
|
||||
* color of the account.
|
||||
|
|
|
@ -14,12 +14,21 @@ value class ServerEnvIdentity @Deprecated("Use the [ServerEnv.identity] property
|
|||
) {
|
||||
val connect get() = Connect(url = url + "connect/")
|
||||
|
||||
val accounts get() = Accounts(url = url + "accounts/")
|
||||
|
||||
@JvmInline
|
||||
value class Connect(
|
||||
private val url: String,
|
||||
) {
|
||||
val token get() = url + "token"
|
||||
}
|
||||
|
||||
@JvmInline
|
||||
value class Accounts(
|
||||
private val url: String,
|
||||
) {
|
||||
val prelogin get() = url + "prelogin"
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
|
|
|
@ -280,7 +280,7 @@ private suspend fun prelogin(
|
|||
env: ServerEnv,
|
||||
email: String,
|
||||
): PreLogin = httpClient
|
||||
.post(env.api.accounts.prelogin) {
|
||||
.post(env.identity.accounts.prelogin) {
|
||||
headers(env)
|
||||
contentType(ContentType.Application.Json)
|
||||
setBody(
|
||||
|
|
Loading…
Reference in New Issue