mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 23:07:28 +08:00
[F] Fix keychip flow
q
This commit is contained in:
@@ -172,7 +172,7 @@ class UserRegistrar(
|
|||||||
@API("/keychip")
|
@API("/keychip")
|
||||||
@Doc("Get a Keychip ID so that the user can connect to the server.", "Success message")
|
@Doc("Get a Keychip ID so that the user can connect to the server.", "Success message")
|
||||||
suspend fun setupConnection(@RP token: Str) = jwt.auth(token) { u ->
|
suspend fun setupConnection(@RP token: Str) = jwt.auth(token) { u ->
|
||||||
if (u.keychip != null) mapOf("keychip" to u.keychip)
|
if (u.keychip != null) return mapOf("keychip" to u.keychip)
|
||||||
|
|
||||||
// Generate a keychip id with 10 digits (e.g. A1234567890)
|
// Generate a keychip id with 10 digits (e.g. A1234567890)
|
||||||
var new = "A" + keychipRange.random()
|
var new = "A" + keychipRange.random()
|
||||||
|
|||||||
Reference in New Issue
Block a user