[+] Last played host

This commit is contained in:
Azalea
2024-04-22 11:17:16 -04:00
parent 4a84a9ed8e
commit f6cf157930
6 changed files with 11 additions and 3 deletions

View File

@@ -137,7 +137,8 @@ abstract class GameApiController<T : IUserData>(name: String, userDataClass: KCl
lastSeen = user.lastPlayDate.toString(),
lastVersion = user.lastRomVersion,
ratingComposition = ratingComp,
recent = plays.sortedBy { it.userPlayDate.toString() }.takeLast(15).reversed()
recent = plays.sortedBy { it.userPlayDate.toString() }.takeLast(15).reversed(),
lastPlayedHost = us.userRepo.findByKeychip(user.lastClientId)?.username
)
}
}

View File

@@ -41,6 +41,7 @@ data class GenericGameSummary(
val joined: String,
val lastSeen: String,
val lastVersion: String,
val lastPlayedHost: String? = null,
val ratingComposition: Map<String, Any>,
@@ -88,6 +89,7 @@ interface IUserData {
val lastRomVersion: String
val totalScore: Long
var card: Card?
val lastClientId: String
}
interface IGenericGamePlaylog {