fix crash on deleteApiCall

multistore
Razmig Sarkissian 2 years ago
parent db67bca0d0
commit f3aa070736
  1. 4
      LeStorage/Services.swift

@ -104,7 +104,9 @@ public class Services {
case 200...300: case 200...300:
if let apiCallId, if let apiCallId,
let collectionName = (T.self as? any Storable.Type)?.resourceName() { let collectionName = (T.self as? any Storable.Type)?.resourceName() {
try Store.main.deleteApiCallById(apiCallId, collectionName: collectionName) try await MainActor.run {
try Store.main.deleteApiCallById(apiCallId, collectionName: collectionName)
}
} }
default: default:
if let apiCallId, let type = (T.self as? any Storable.Type) { if let apiCallId, let type = (T.self as? any Storable.Type) {

Loading…
Cancel
Save