[+] Verse: Save unlock challenge

This commit is contained in:
Azalea
2025-03-09 09:57:46 -04:00
parent 18ecbe0f44
commit b2f680da4e
4 changed files with 28 additions and 0 deletions

View File

@@ -124,6 +124,10 @@ fun ChusanController.upsertApiInit() {
db.userDuel.saveAll(list.distinctBy { it.duelId }.mapApply {
id = db.userDuel.findByUserAndDuelId(u, duelId)?.id ?: 0 }) }
userUnlockChallengeList?.let { list ->
db.userChallenge.saveAll(list.distinctBy { it.unlockChallengeId }.mapApply {
id = db.userChallenge.findByUserAndUnlockChallengeId(u, unlockChallengeId)?.id ?: 0 }) }
// Need testing
// userLoginBonusList?.let { list ->
// db.userLoginBonus.saveAll(list.distinctBy { it["presetId"] as String }.map {