debug session

- MariadbSessionStorage not found error fix.
This commit is contained in:
dalbodeule
2024-08-10 17:25:52 +09:00
parent 2335a09391
commit a01827b055

View File

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