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(
|
value class Accounts(
|
||||||
private val url: String,
|
private val url: String,
|
||||||
) {
|
) {
|
||||||
val prelogin get() = url + "prelogin"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a PUT request to change the avatar
|
* Send a PUT request to change the avatar
|
||||||
* color of the account.
|
* 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 connect get() = Connect(url = url + "connect/")
|
||||||
|
|
||||||
|
val accounts get() = Accounts(url = url + "accounts/")
|
||||||
|
|
||||||
@JvmInline
|
@JvmInline
|
||||||
value class Connect(
|
value class Connect(
|
||||||
private val url: String,
|
private val url: String,
|
||||||
) {
|
) {
|
||||||
val token get() = url + "token"
|
val token get() = url + "token"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@JvmInline
|
||||||
|
value class Accounts(
|
||||||
|
private val url: String,
|
||||||
|
) {
|
||||||
|
val prelogin get() = url + "prelogin"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
@Suppress("DEPRECATION")
|
||||||
|
|
|
@ -280,7 +280,7 @@ private suspend fun prelogin(
|
||||||
env: ServerEnv,
|
env: ServerEnv,
|
||||||
email: String,
|
email: String,
|
||||||
): PreLogin = httpClient
|
): PreLogin = httpClient
|
||||||
.post(env.api.accounts.prelogin) {
|
.post(env.identity.accounts.prelogin) {
|
||||||
headers(env)
|
headers(env)
|
||||||
contentType(ContentType.Application.Json)
|
contentType(ContentType.Application.Json)
|
||||||
setBody(
|
setBody(
|
||||||
|
|
Loading…
Reference in New Issue