simplify call

sync2
Laurent 11 months ago
parent 1e47f2009f
commit 4423d3f52a
  1. 12
      LeStorage/StoreCenter.swift

@ -353,15 +353,15 @@ public class StoreCenter {
} }
/// Executes an ApiCall /// Executes an ApiCall
fileprivate func _executeApiCall<T: SyncedStorable, V: Decodable>(_ apiCall: ApiCall<T>) // fileprivate func _executeApiCall<T: SyncedStorable, V: Decodable>(_ apiCall: ApiCall<T>)
async throws -> V // async throws -> V
{ // {
return try await self.service().runApiCall(apiCall) // return try await self.service().runApiCall(apiCall)
} // }
/// Executes an API call /// Executes an API call
func execute<T: SyncedStorable, V: Decodable>(apiCall: ApiCall<T>) async throws -> V { func execute<T: SyncedStorable, V: Decodable>(apiCall: ApiCall<T>) async throws -> V {
return try await self._executeApiCall(apiCall) return try await self.service().runApiCall(apiCall)
} }
// MARK: - Api calls // MARK: - Api calls

Loading…
Cancel
Save