Fixes issue with copyServerResponse

sync_v2
Laurent 7 months ago
parent 787d0d7366
commit e4dac9ff43
  1. 1
      LeStorage/Codables/DataAccess.swift
  2. 3
      LeStorage/Codables/FailedAPICall.swift
  3. 3
      LeStorage/Codables/GetSyncData.swift
  4. 1
      LeStorage/Codables/Log.swift
  5. 4
      LeStorage/ModelObject.swift
  6. 2
      LeStorage/SyncedStorable.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()

@ -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 = ""

@ -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"
}

@ -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()

@ -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()
}

@ -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)

Loading…
Cancel
Save