mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-09 07:18:22 +00:00
debug session
- MariadbSessionStorage not found error fix.
This commit is contained in:
parent
2335a09391
commit
a01827b055
@ -25,8 +25,15 @@ class MariadbSessionStorage: SessionStorage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override suspend fun write(id: String, value: String) {
|
override suspend fun write(id: String, value: String) {
|
||||||
Session.findSingleByAndUpdate(SessionTable.key eq id) {
|
val session = Session.find(SessionTable.key eq id).firstOrNull()
|
||||||
it.value = value
|
|
||||||
|
if(session == null) {
|
||||||
|
Session.new {
|
||||||
|
this.key = id
|
||||||
|
this.value = value
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
session.value = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user