05/02 Phase C 2
This commit is contained in:
@@ -1,27 +1,24 @@
|
||||
// Utils/Constants.swift
|
||||
// ---------------------
|
||||
// Central place for app-wide constants.
|
||||
// IMPORTANT: Replace the baseURL with your actual server URL.
|
||||
// IMPORTANT: Replace baseURL with your actual server URL.
|
||||
|
||||
import Foundation
|
||||
|
||||
enum Constants {
|
||||
// ── Server ────────────────────────────────────────────────────────────
|
||||
/// Your JanitorialQC server base URL. No trailing slash.
|
||||
/// Example: "https://your-domain.com"
|
||||
// Explicitly not @MainActor — these constants must be readable from
|
||||
// any actor context including APIClient and KeychainHelper.
|
||||
nonisolated enum Constants {
|
||||
|
||||
static let baseURL = "https://jqc1.ltservicesinc.com"
|
||||
|
||||
// ── Keychain keys ─────────────────────────────────────────────────────
|
||||
enum Keychain {
|
||||
static let accessToken = "com.JanitorialQC.accessToken"
|
||||
static let refreshToken = "com.JanitorialQC.refreshToken"
|
||||
static let userId = "com.JanitorialQC.userId"
|
||||
static let userRole = "com.JanitorialQC.userRole"
|
||||
static let username = "com.JanitorialQC.username"
|
||||
static let displayName = "com.JanitorialQC.displayName"
|
||||
nonisolated enum Keychain {
|
||||
static let accessToken = "com.jqc.accessToken"
|
||||
static let refreshToken = "com.jqc.refreshToken"
|
||||
static let userId = "com.jqc.userId"
|
||||
static let userRole = "com.jqc.userRole"
|
||||
static let username = "com.jqc.username"
|
||||
static let displayName = "com.jqc.displayName"
|
||||
}
|
||||
|
||||
// ── Sync ──────────────────────────────────────────────────────────────
|
||||
/// How many minutes before the access token expires to trigger a refresh
|
||||
static let tokenRefreshBufferMinutes: Double = 5
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user