[O] Optional should not exist in kt

This commit is contained in:
Azalea
2025-10-25 05:50:01 +08:00
parent e7b96d4b24
commit b2aef08c01
38 changed files with 269 additions and 290 deletions

View File

@@ -33,7 +33,7 @@ class Frontier(
if (accessCode.length != 20) 400 - "Invalid access code"
// if (!accessCode.startsWith("9900")) 400 - "Frontier access code must start with 9900"
if (async { cardService.cardRepo.findByLuid(accessCode) }.isPresent) 400 - "Card already registered"
if (async { cardService.cardRepo.findByLuid(accessCode) } != null) 400 - "Card already registered"
val card = async { cardService.registerByAccessCode(accessCode) }