Connect macOS app to backend device bootstrap
This commit is contained in:
@@ -4,7 +4,6 @@ import VelodyDomain
|
||||
import VelodyNetworking
|
||||
import VelodyPersistence
|
||||
import VelodySync
|
||||
import VelodyUtilities
|
||||
|
||||
@MainActor
|
||||
@Observable
|
||||
@@ -13,13 +12,12 @@ final class iPhoneLibraryViewModel {
|
||||
var syncStatus = "Offline library not synced yet"
|
||||
|
||||
private let store = InMemoryLocalLibraryStore()
|
||||
private let keychainService = MemoryKeychainService()
|
||||
private let syncCoordinator: PlaceholderSyncCoordinator
|
||||
private var hasLoaded = false
|
||||
|
||||
init() {
|
||||
let environment = ServerEnvironment(
|
||||
baseURL: URL(string: "http://localhost:3000")!,
|
||||
baseURL: ServerEnvironment.defaultLocalBaseURL,
|
||||
appVersion: "0.1.0"
|
||||
)
|
||||
let apiClient = StubVelodyAPIClient(environment: environment)
|
||||
@@ -32,7 +30,6 @@ final class iPhoneLibraryViewModel {
|
||||
func loadIfNeeded() async {
|
||||
guard !hasLoaded else { return }
|
||||
hasLoaded = true
|
||||
await keychainService.save("placeholder-bootstrap-token", forKey: "bootstrap-token")
|
||||
await refreshSync()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user