pull/74/head
Azalea 2024-10-22 09:20:33 -04:00
parent be7b0945e9
commit 4713a44573
1 changed files with 2 additions and 2 deletions

View File

@ -17,9 +17,9 @@ import org.springframework.scheduling.annotation.Scheduled
import org.springframework.stereotype.Service import org.springframework.stereotype.Service
import org.springframework.web.bind.annotation.RestController import org.springframework.web.bind.annotation.RestController
import java.time.LocalDateTime import java.time.LocalDateTime
import java.time.ZoneOffset
import kotlin.jvm.optionals.getOrNull import kotlin.jvm.optionals.getOrNull
import kotlin.random.Random import kotlin.random.Random
import kotlin.random.nextULong
@RestController @RestController
@API("/api/v2/card") @API("/api/v2/card")
@ -141,7 +141,7 @@ suspend fun <T : IUserData> migrateCard(repo: GenericUserDataRepo<T>, cardRepo:
async { repo.findByCard(ghost) }?.let { async { repo.findByCard(ghost) }?.let {
// Create a new dummy card for deleted data // Create a new dummy card for deleted data
it.card = async { cardRepo.save(Card().apply { it.card = async { cardRepo.save(Card().apply {
luid = "Migrated data of ghost card ${ghost.id} for user ${card.aquaUser!!.auId}" luid = "Migrated data of ghost card ${ghost.id} for user ${card.aquaUser!!.auId} on ${LocalDateTime.now(ZoneOffset.UTC).isoDateTime()}"
// Randomize an extId outside the normal range // Randomize an extId outside the normal range
extId = Random.nextLong(0x7FFFFFF7L shl 32, 0x7FFFFFFFL shl 32) extId = Random.nextLong(0x7FFFFFF7L shl 32, 0x7FFFFFFFL shl 32)
registerTime = LocalDateTime.now() registerTime = LocalDateTime.now()