mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 15:37:27 +08:00
[F] Not extId
This commit is contained in:
@@ -116,7 +116,7 @@ class AquaUserServices(
|
|||||||
|
|
||||||
fun <T> cardByName(username: Str, callback: (Card) -> T) =
|
fun <T> cardByName(username: Str, callback: (Card) -> T) =
|
||||||
if (username.startsWith("card")) username.substring(4).toLongOrNull()
|
if (username.startsWith("card")) username.substring(4).toLongOrNull()
|
||||||
?.let { cardRepo.findByExtId(it).getOrNull() }
|
?.let { cardRepo.findById(it).getOrNull() }
|
||||||
?.let(callback) ?: (404 - "Card not found")
|
?.let(callback) ?: (404 - "Card not found")
|
||||||
else byName(username) { callback(it.ghostCard) }
|
else byName(username) { callback(it.ghostCard) }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user