mirror of
https://github.com/akyaiy/GoSally-mvp.git
synced 2026-01-03 19:52:25 +00:00
add sid
This commit is contained in:
@@ -44,7 +44,7 @@ func getDBMutex(dbPath string) *sync.RWMutex {
|
|||||||
return mtx
|
return mtx
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadDBMod(llog *slog.Logger) func(*lua.LState) int {
|
func loadDBMod(llog *slog.Logger, sid string) func(*lua.LState) int {
|
||||||
return func(L *lua.LState) int {
|
return func(L *lua.LState) int {
|
||||||
llog.Debug("import module db-sqlite")
|
llog.Debug("import module db-sqlite")
|
||||||
dbMod := L.NewTable()
|
dbMod := L.NewTable()
|
||||||
@@ -85,7 +85,7 @@ func loadDBMod(llog *slog.Logger) func(*lua.LState) int {
|
|||||||
"close": dbClose,
|
"close": dbClose,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
L.SetField(dbMod, "__gosally_internal", lua.LString("0"))
|
L.SetField(dbMod, "__gosally_internal", lua.LString(sid))
|
||||||
L.Push(dbMod)
|
L.Push(dbMod)
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user