[+] Wacca username character constraint

This commit is contained in:
Azalea
2024-04-01 21:54:54 -04:00
parent de649915e2
commit 646795b753
7 changed files with 21 additions and 23 deletions

View File

@@ -4,7 +4,7 @@ import com.fasterxml.jackson.core.JsonProcessingException
import ext.invoke
import ext.mapApply
import ext.minus
import icu.samnyan.aqua.net.games.USERNAME_CHARS
import icu.samnyan.aqua.net.games.SEGA_USERNAME_CAHRS
import icu.samnyan.aqua.sega.general.BaseHandler
import icu.samnyan.aqua.sega.general.service.CardService
import icu.samnyan.aqua.sega.maimai2.handler.UploadUserPlaylogHandler.Companion.playBacklog
@@ -27,7 +27,7 @@ class UpsertUserAllHandler(
val repos: Mai2Repos
) : BaseHandler {
fun String.isValidUsername() = isNotBlank() && length <= 8 && all { it in USERNAME_CHARS }
fun String.isValidUsername() = isNotBlank() && length <= 8 && all { it in SEGA_USERNAME_CAHRS }
@Throws(JsonProcessingException::class)
override fun handle(request: Map<String, Any>): Any? {