diff --git a/LeStorage/Codables/DataAccess.swift b/LeStorage/Codables/DataAccess.swift index ab428ce..f791c62 100644 --- a/LeStorage/Codables/DataAccess.swift +++ b/LeStorage/Codables/DataAccess.swift @@ -12,6 +12,7 @@ class DataAccess: SyncedModelObject, SyncedStorable { static func tokenExemptedMethods() -> [HTTPMethod] { return [] } static func resourceName() -> String { return "data-access" } static func relationships() -> [Relationship] { return [] } + static var copyServerResponse: Bool = false override required init() { super.init() diff --git a/LeStorage/Codables/FailedAPICall.swift b/LeStorage/Codables/FailedAPICall.swift index 53786dd..6b340bd 100644 --- a/LeStorage/Codables/FailedAPICall.swift +++ b/LeStorage/Codables/FailedAPICall.swift @@ -8,10 +8,11 @@ import Foundation class FailedAPICall: SyncedModelObject, SyncedStorable { - + static func resourceName() -> String { return "failed-api-calls" } static func tokenExemptedMethods() -> [HTTPMethod] { return [] } static func relationships() -> [Relationship] { return [] } + static var copyServerResponse: Bool = false override required init() { self.callId = "" diff --git a/LeStorage/Codables/GetSyncData.swift b/LeStorage/Codables/GetSyncData.swift index 7d246b8..a8378fe 100644 --- a/LeStorage/Codables/GetSyncData.swift +++ b/LeStorage/Codables/GetSyncData.swift @@ -20,7 +20,8 @@ class GetSyncData: SyncedModelObject, SyncedStorable, URLParameterConvertible { } static func tokenExemptedMethods() -> [HTTPMethod] { return [] } - + static var copyServerResponse: Bool = false + static func resourceName() -> String { return "sync-data" } diff --git a/LeStorage/Codables/Log.swift b/LeStorage/Codables/Log.swift index 5a223ac..ab9f2a7 100644 --- a/LeStorage/Codables/Log.swift +++ b/LeStorage/Codables/Log.swift @@ -12,6 +12,7 @@ class Log: SyncedModelObject, SyncedStorable { static func resourceName() -> String { return "logs" } static func tokenExemptedMethods() -> [HTTPMethod] { return [] } static func relationships() -> [Relationship] { return [] } + static var copyServerResponse: Bool = false override required init() { super.init() diff --git a/LeStorage/ModelObject.swift b/LeStorage/ModelObject.swift index f7f5160..e13f03f 100644 --- a/LeStorage/ModelObject.swift +++ b/LeStorage/ModelObject.swift @@ -53,10 +53,6 @@ open class SyncedModelObject: BaseModelObject { public var lastUpdate: Date = Date() public var shared: Bool? - open func copyFromServerInstance(_ instance: any Storable) -> Bool { - return false - } - public override init() { super.init() } diff --git a/LeStorage/SyncedStorable.swift b/LeStorage/SyncedStorable.swift index f997542..8c98f2e 100644 --- a/LeStorage/SyncedStorable.swift +++ b/LeStorage/SyncedStorable.swift @@ -32,8 +32,6 @@ public protocol SideStorable { extension SyncedStorable { - public static var copyServerResponse: Bool { return false } - func copy() -> Self { let copy = Self() copy.copy(from: self)