debug session (2x)

- MariadbSessionStorage not found error fix.
This commit is contained in:
dalbodeule 2024-08-10 17:29:40 +09:00
parent a01827b055
commit a26586c6b4
No known key found for this signature in database
GPG Key ID: EFA860D069C9FA65

View File

@ -25,15 +25,17 @@ class MariadbSessionStorage: SessionStorage {
} }
override suspend fun write(id: String, value: String) { override suspend fun write(id: String, value: String) {
val session = Session.find(SessionTable.key eq id).firstOrNull() return transaction {
val session = Session.find(SessionTable.key eq id).firstOrNull()
if(session == null) { if (session == null) {
Session.new { Session.new {
this.key = id this.key = id
this.value = value this.value = value
}
} else {
session.value = value
} }
} else {
session.value = value
} }
} }
} }