(query)
| 165 | * @throws {NotFound} If no progress documents are found based on the given query. |
| 166 | */ |
| 167 | const getProgressDocs = async (query) => { |
| 168 | const progressesDocs = await query.get(); |
| 169 | if (!progressesDocs.size) { |
| 170 | throw new NotFound(PROGRESS_DOCUMENT_NOT_FOUND); |
| 171 | } |
| 172 | const docsData = []; |
| 173 | progressesDocs.forEach((doc) => { |
| 174 | docsData.push({ id: doc.id, ...doc.data() }); |
| 175 | }); |
| 176 | return docsData; |
| 177 | }; |
| 178 | /** |
| 179 | * Retrieves progress documents from Firestore based on the given query and page number. |
| 180 | * |
no test coverage detected