(queryParams)
| 85 | * @returns {Promise<void>} A promise that resolves if either the user or the task exists and rejects with a `NotFound` error if neither exists. |
| 86 | */ |
| 87 | const assertUserOrTaskExists = async (queryParams) => { |
| 88 | const { userId, taskId } = queryParams; |
| 89 | if (userId) { |
| 90 | await assertUserExists(userId); |
| 91 | } else if (taskId) { |
| 92 | await assertTaskExists(taskId); |
| 93 | } |
| 94 | }; |
| 95 | |
| 96 | /** |
| 97 | * Builds a Firestore query for retrieving progress documents within a date range and optionally filtered by user ID or task ID. |
no test coverage detected