Merge pull request #54 from dalbodeule/develop

debug session
This commit is contained in:
JinU Choi 2024-08-10 17:27:18 +09:00 committed by GitHub
commit eab0107115
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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
}
}
}