[O] Refactor maimai2 repositories

This commit is contained in:
Azalea
2024-03-16 19:50:05 -04:00
parent e07de72fa4
commit 54b1174e1b
32 changed files with 231 additions and 552 deletions

View File

@@ -113,7 +113,7 @@ class CardController(
*
* Assumption: The card is already linked to the user.
*/
suspend fun <T : IGenericUserData> migrateCard(repo: GenericUserDataRepo<T, *>, card: Card): Bool
suspend fun <T : IGenericUserData> migrateCard(repo: GenericUserDataRepo<T>, card: Card): Bool
{
// Check if data already exists in the user's ghost card
async { repo.findByCard(card.aquaUser!!.ghostCard) }?.let {
@@ -130,7 +130,7 @@ suspend fun <T : IGenericUserData> migrateCard(repo: GenericUserDataRepo<T, *>,
return true
}
suspend fun getSummaryFor(repo: GenericUserDataRepo<*, *>, card: Card): Map<Str, Any>?
suspend fun getSummaryFor(repo: GenericUserDataRepo<*>, card: Card): Map<Str, Any>?
{
val data = async { repo.findByCard(card) } ?: return null
return mapOf(