refactor: tiny cleanup
This commit is contained in:
parent
a2fb59c6f8
commit
9cef464bf5
1 changed files with 1 additions and 4 deletions
|
|
@ -15,8 +15,6 @@ import io.ktor.http.contentType
|
||||||
import kotlinx.serialization.Serializable
|
import kotlinx.serialization.Serializable
|
||||||
import moe.lava.neon.core.AppSettings
|
import moe.lava.neon.core.AppSettings
|
||||||
import moe.lava.neon.core.api.ApiClient
|
import moe.lava.neon.core.api.ApiClient
|
||||||
import moe.lava.neon.core.api.captcha.CaptchaRequest
|
|
||||||
import moe.lava.neon.core.api.captcha.CaptchaResponse
|
|
||||||
|
|
||||||
@Serializable
|
@Serializable
|
||||||
private data class ExperimentResponse(
|
private data class ExperimentResponse(
|
||||||
|
|
@ -64,7 +62,6 @@ class AuthRepository(
|
||||||
suspend fun login(
|
suspend fun login(
|
||||||
email: String,
|
email: String,
|
||||||
password: String,
|
password: String,
|
||||||
captcha: Pair<CaptchaRequest, CaptchaResponse.Success>? = null,
|
|
||||||
): AuthResponse {
|
): AuthResponse {
|
||||||
if (fingerprint == null) {
|
if (fingerprint == null) {
|
||||||
fingerprint = api.client.get("experiments") {
|
fingerprint = api.client.get("experiments") {
|
||||||
|
|
@ -86,7 +83,7 @@ class AuthRepository(
|
||||||
return AuthResponse.Success(body.token)
|
return AuthResponse.Success(body.token)
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend fun login(token: String): String {
|
fun login(token: String): String {
|
||||||
this.token = token
|
this.token = token
|
||||||
return token
|
return token
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue