WIP - Complete App refactoring
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// CookbookV1Account.swift
|
||||
// CookbookAccount.swift
|
||||
// Nextcloud Cookbook iOS Client
|
||||
//
|
||||
// Created by Vincent Meilinger on 24.01.25.
|
||||
@@ -10,9 +10,10 @@ import KeychainSwift
|
||||
|
||||
|
||||
struct CookbookAccount: Account {
|
||||
let accountType: AccountType = .cookbook
|
||||
|
||||
let id: UUID
|
||||
var displayName: String = "Nextcloud Cookbook Account"
|
||||
let accountType: AccountType = .cookbook
|
||||
|
||||
let baseURL: URL
|
||||
let username: String
|
||||
|
||||
@@ -6,3 +6,23 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
|
||||
|
||||
struct LocalAccount: Account {
|
||||
let id: UUID
|
||||
var displayName: String = "Local Account"
|
||||
var accountType: AccountType = .local
|
||||
|
||||
let baseURL: URL = URL(filePath: "")!
|
||||
let username: String = ""
|
||||
|
||||
/// Keychain convenience
|
||||
func saveTokenToKeychain(_ token: String) {
|
||||
return
|
||||
}
|
||||
|
||||
func getTokenFromKeychain() -> String? {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user