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

Function buildQueryForFetchingDocsOfType

utils/monitor.js:32–39  ·  view source on GitHub ↗
(queryParams)

Source from the content-addressed store, hash-verified

30 * @returns {Firestore.Query} - A Firestore query for fetching tracked progress documents of a specific type.
31 */
32const 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.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected