(queryParams)
| 30 | * @returns {Firestore.Query} - A Firestore query for fetching tracked progress documents of a specific type. |
| 31 | */ |
| 32 | const buildQueryForFetchingDocsOfType = (queryParams) => { |
| 33 | const { type, monitored } = queryParams; |
| 34 | let query = trackedProgressesCollection.where("type", "==", type); |
| 35 | if (monitored !== undefined) { |
| 36 | query = query.where("monitored", "==", JSON.parse(monitored)); |
| 37 | } |
| 38 | return query; |
| 39 | }; |
| 40 | |
| 41 | /** |
| 42 | * Retrieves progress documents from Firestore based on the given query. |
no outgoing calls
no test coverage detected