mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
Fix bug where active session ID is sometimes not persisted (#248)
This commit is contained in:
@@ -1056,6 +1056,7 @@ func getNextId(ids []string, delId string) string {
|
||||
}
|
||||
|
||||
func SwitchScreenById(ctx context.Context, sessionId string, screenId string) (*ModelUpdate, error) {
|
||||
SetActiveSessionId(ctx, sessionId)
|
||||
txErr := WithTx(ctx, func(tx *TxWrap) error {
|
||||
query := `SELECT screenid FROM screen WHERE sessionid = ? AND screenid = ?`
|
||||
if !tx.Exists(query, sessionId, screenId) {
|
||||
|
||||
Reference in New Issue
Block a user