MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / getProgressDocs

Function getProgressDocs

utils/progresses.js:167–177  ·  view source on GitHub ↗
(query)

Source from the content-addressed store, hash-verified

165 * @throws {NotFound} If no progress documents are found based on the given query.
166 */
167const 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 *

Callers 1

getProgressDocumentFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected