[Feat] In request(endpoint:), when the FiresotreMethod case is save, the logic is separated into the saveDocument(endpoint:) function.
[Feature]
In the previous request (endpoint:), if the output publisher's value was Void, the FirestoreMethod case processed three things: save, upate, and delete.
What's new!
[saveDocument(endpoint:)]
- In the case of endpoint's firestore method save, the role is now separated from request(endpoint:) -> AnyPublisher<Void, FirestoreServiceError> to saveDocument(endopint:).
- When saving an existing document, an invalidRequestDTO error is thrown if there is no requestDTO in the endpoint.
- Now, added a document with an empty field value depending on whether there is an associated value of FirestoreMethod case save or not.
- When using saveDocumetn(endpoint:), The ID of the created document is returned as the output publisher's string value.
[backgroundQueue]
- By default, you have specified a background queue for work to be processed by a background thread.
- However, if it is not already the main thread at the time you call the service from outside, you can specify a backgroundQueue at init time to run in that thread's queue.