refactor: centralize main session key normalization in apps

This commit is contained in:
Peter Steinberger
2026-01-09 22:38:12 +01:00
parent 40b4341a1d
commit 92cc7a841c
7 changed files with 21 additions and 7 deletions

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
}
}