From dd14e9f518136edb948cdc24cd7e2cdc8ad85220 Mon Sep 17 00:00:00 2001 From: YoyoNow Date: Sun, 9 Nov 2025 17:30:17 +0100 Subject: [PATCH] Cleanup Session --- CommonCore/SQL/src/de/steamwar/sql/Session.kt | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/CommonCore/SQL/src/de/steamwar/sql/Session.kt b/CommonCore/SQL/src/de/steamwar/sql/Session.kt index 029ec6cc..14a30237 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/Session.kt +++ b/CommonCore/SQL/src/de/steamwar/sql/Session.kt @@ -33,14 +33,12 @@ object SessionTable: Table("Session") { val endTime = timestamp("EndTime").defaultExpression(CurrentTimestamp) } -class Session { - companion object { - @JvmStatic - fun insertSession(userId: Int, startTime: Timestamp) = useDb { - SessionTable.insert { - it[SessionTable.userId] = EntityID(userId, SteamwarUserTable) - it[SessionTable.startTime] = startTime.toInstant() - } +object Session { + @JvmStatic + fun insertSession(userId: Int, startTime: Timestamp) = useDb { + SessionTable.insert { + it[SessionTable.userId] = EntityID(userId, SteamwarUserTable) + it[SessionTable.startTime] = startTime.toInstant() } } } \ No newline at end of file