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

Function buildQueryForPostingProgress

utils/progresses.js:38–44  ·  view source on GitHub ↗
({ type, userId, taskId })

Source from the content-addressed store, hash-verified

36 * @returns {Query} A Firestore query object that filters progress documents based on the given parameters.
37 */
38const buildQueryForPostingProgress = ({ type, userId, taskId }) => {
39 const query =
40 type === "user"
41 ? progressesCollection.where("type", "==", "user").where("userId", "==", userId)
42 : progressesCollection.where("type", "==", "task").where("taskId", "==", taskId);
43 return query;
44};
45
46/**
47 * Checks if a user with a given ID exists in the system.

Callers 1

createProgressDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected