Skip to content

[Feat] Add logic to return an empty string in FirestoreService.request(endpoint:)

Choose a tag to compare

@SHcommit SHcommit released this 01 May 13:07
· 64 commits to master since this release

[Feature]

public func request<D, E>(
    endpoint: E
  ) -> AnyPublisher<[D], FirestoreServiceError>
  where D == E.ResponseDTO, E : FirestoreEndopintable
  • Add logic to return an empty string in FirestoreService.request(endpoint:) if the document in the collection is empty.
  • When there are no documents in the collection, we decided that it would be better to return an empty array rather than an error saying there is no document, so we modified it.