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

Function getRangeProgressData

models/progresses.js:82–92  ·  view source on GitHub ↗
(queryParams)

Source from the content-addressed store, hash-verified

80 * @throws {Error} If the userId or taskId is invalid or does not exist.
81 **/
82const getRangeProgressData = async (queryParams) => {
83 const { startDate, endDate } = queryParams;
84 await assertUserOrTaskExists(queryParams);
85 const query = buildRangeProgressQuery(queryParams);
86 const progressRecords = await getProgressRecords(query, queryParams);
87 return {
88 startDate,
89 endDate,
90 progressRecords,
91 };
92};
93
94/**
95 * This function fetches the progress records for a particular user or task on the specified date.

Callers

nothing calls this directly

Calls 3

assertUserOrTaskExistsFunction · 0.85
buildRangeProgressQueryFunction · 0.85
getProgressRecordsFunction · 0.85

Tested by

no test coverage detected