mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-08-08 05:11:12 +00:00
debug session (2x)
- MariadbSessionStorage not found error fix.
This commit is contained in:
@@ -25,15 +25,17 @@ class MariadbSessionStorage: SessionStorage {
|
||||
}
|
||||
|
||||
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) {
|
||||
Session.new {
|
||||
this.key = id
|
||||
this.value = value
|
||||
if (session == null) {
|
||||
Session.new {
|
||||
this.key = id
|
||||
this.value = value
|
||||
}
|
||||
} else {
|
||||
session.value = value
|
||||
}
|
||||
} else {
|
||||
session.value = value
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user