File tree Expand file tree Collapse file tree 2 files changed +1
-15
lines changed
Sources/SHFirestoreService Expand file tree Collapse file tree 2 files changed +1
-15
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,4 @@ public protocol FirestoreAccessible {
1414 var collectionRef : CollectionReference { get }
1515 var documentRef : DocumentReference ? { get }
1616}
17-
18- // MARK: - Helpers
19- public extension FirestoreAccessible {
20- var asCollectionRef : CollectionReference ? {
21- return self as? CollectionReference
22- }
23-
24- var asDocumentRef : DocumentReference ? {
25- return self as? DocumentReference
26- }
27- }
2817#endif
Original file line number Diff line number Diff line change @@ -443,11 +443,8 @@ extension FirestoreService: FirestoreDocumentSupportable {
443443 makeQuery: @escaping QueryHandler
444444 ) -> AnyPublisher < Bool , FirestoreServiceError > {
445445 return Future < Bool , FirestoreServiceError > { promise in
446- guard let collectionRef = endpoint. requestType. asCollectionRef else {
447- promise ( . failure( . collectionNotFound) )
448- return
449- }
450446 do {
447+ let collectionRef = endpoint. requestType. collectionRef
451448 let query = try makeQuery ( collectionRef)
452449 query. getDocuments { querySnapshot, error in
453450 if let error = error {
You can’t perform that action at this time.
0 commit comments