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