refactor: centralize main session key normalization in apps

This commit is contained in:
Peter Steinberger committed 2026-01-09 22:38:17 +01:00
1 parent 40b4341a1d
commit 92cc7a841c
7 files changed
+21 -7

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
import Foundation
enum SessionKey {
static func normalizeMainKey(_ raw: String?) -> String {
let trimmed = (raw ?? "").trimmingCharacters(in: .whitespacesAndNewlines)
return trimmed.isEmpty ? "main" : trimmed
}
}