mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-07 21:01:14 +00:00
debug session
- MariadbSessionStorage not found error fix.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user