[+] Allow register-card via http

pull/49/head
Clansty 2024-07-29 06:18:53 +08:00
parent 11ab81a484
commit df3bd6fbec
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ class Frontier(
ftk.checkFtk() ftk.checkFtk()
if (accessCode.length != 20) 400 - "Invalid access code" if (accessCode.length != 20) 400 - "Invalid access code"
if (!accessCode.startsWith("9900")) 400 - "Frontier access code must start with 9900" // 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) }.isPresent) 400 - "Card already registered"
val card = async { cardService.registerByAccessCode(accessCode) } val card = async { cardService.registerByAccessCode(accessCode) }