From c64db61e257e8223dc0c6fe496af0e4598785832 Mon Sep 17 00:00:00 2001 From: Lucas EVARD Date: Wed, 22 May 2024 11:33:58 +0200 Subject: [PATCH] revert f82aba9a02aedc80d8384da261450d9f21ecfdef revert :sparkles: Refactor and add PopularityScore for Mocking Data Source --- .../main/kotlin/allin/data/postgres/PostgresBetDataSource.kt | 1 - .../src/main/kotlin/allin/data/postgres/entities/BetEntity.kt | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt b/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt index 72c335d..d19155e 100644 --- a/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt +++ b/Sources/src/main/kotlin/allin/data/postgres/PostgresBetDataSource.kt @@ -174,7 +174,6 @@ class PostgresBetDataSource(private val database: Database) : BetDataSource { this.createdBy = bet.createdBy this.status = bet.status this.type = bet.type - this.popularityscore = 0 } ) diff --git a/Sources/src/main/kotlin/allin/data/postgres/entities/BetEntity.kt b/Sources/src/main/kotlin/allin/data/postgres/entities/BetEntity.kt index 31949eb..8c0e964 100644 --- a/Sources/src/main/kotlin/allin/data/postgres/entities/BetEntity.kt +++ b/Sources/src/main/kotlin/allin/data/postgres/entities/BetEntity.kt @@ -41,8 +41,7 @@ interface BetEntity : Entity { } else { database.responses.filter { it.betId eq id }.map { it.response } }, - createdBy = createdBy, - popularityscore = popularityscore, + createdBy = createdBy ) fun toBetDetail(database: Database, username: String): BetDetail {