|
|
|
|
@ -237,13 +237,13 @@ public class SyncedCollection<T : SyncedStorable>: BaseCollection<T>, SomeSynced |
|
|
|
|
|
|
|
|
|
// MARK: Single calls |
|
|
|
|
|
|
|
|
|
fileprivate func _addsIfPostSucceeds(_ instance: T) async throws { |
|
|
|
|
public func addsIfPostSucceeds(_ instance: T) async throws { |
|
|
|
|
if let result = try await StoreCenter.main.service().post(instance) { |
|
|
|
|
self.addOrUpdateNoSync(result) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fileprivate func _updateIfPutSucceeds(_ instance: T) async throws { |
|
|
|
|
public func updateIfPutSucceeds(_ instance: T) async throws { |
|
|
|
|
if let result = try await StoreCenter.main.service().put(instance) { |
|
|
|
|
self.addOrUpdateNoSync(result) |
|
|
|
|
} |
|
|
|
|
|