From ddacad6885e6a00f6a2f67cde097d5ed882404b9 Mon Sep 17 00:00:00 2001 From: luevard <99143550+saucepommefrite@users.noreply.github.com> Date: Wed, 22 May 2024 10:13:33 +0200 Subject: [PATCH] :sparkles: debug Popular bet --- .../main/kotlin/allin/data/postgres/PostgresBetDataSource.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt b/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt index 3751052..f554b03 100644 --- a/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt +++ b/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt @@ -111,6 +111,11 @@ class PostgresBetDataSource(private val database: Database) : BetDataSource { } override fun getMostPopularBet(): Bet? { + + database.bets.forEach { + println(it) + } + val max=database.bets.filter { (it.isPrivate eq false) and (it.status eq BetStatus.WAITING) }.maxBy { it.popularityscore } println(max) if(max!=null){