mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-09 08:27:27 +08:00
[+] Wacca user/status/login
This commit is contained in:
@@ -12,17 +12,6 @@ const val FTK = "test"
|
||||
const val HOST = "http://localhost"
|
||||
val ACCESS_CODE = "9900" + (1..16).map { Random.nextInt(0..9) }.joinToString("")
|
||||
|
||||
inline fun <reified T> String.json() = try {
|
||||
JACKSON.readValue(this, T::class.java)
|
||||
}
|
||||
catch (e: Exception) {
|
||||
println("Failed to parse JSON: $this")
|
||||
throw e
|
||||
}
|
||||
|
||||
fun String.jsonMap(): Map<String, Any?> = json()
|
||||
fun String.jsonArray(): List<Map<String, Any?>> = json()
|
||||
|
||||
suspend fun registerUser(): Long {
|
||||
val resp = HTTP.post(HOST.ensureEndingSlash() + "api/v2/frontier/register-card") {
|
||||
parameter("ftk", FTK)
|
||||
|
||||
Reference in New Issue
Block a user