05/02 Phase C 2

This commit is contained in:
Nguyen Ngo
2026-05-03 09:29:12 -04:00
parent 59e698b5f7
commit 51d2923e6d
6 changed files with 439 additions and 309 deletions
+12 -15
View File
@@ -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
}