(req, res)
| 194 | */ |
| 195 | |
| 196 | const getProgressRangeData = async (req, res) => { |
| 197 | try { |
| 198 | const data = await progressesModel.getRangeProgressData(req.query); |
| 199 | return res.json({ |
| 200 | message: PROGRESS_DOCUMENT_RETRIEVAL_SUCCEEDED, |
| 201 | data, |
| 202 | }); |
| 203 | } catch (error) { |
| 204 | if (error instanceof NotFound) { |
| 205 | return res.status(404).json({ |
| 206 | message: error.message, |
| 207 | }); |
| 208 | } |
| 209 | logger.error(error.message); |
| 210 | return res.status(500).json({ |
| 211 | message: INTERNAL_SERVER_ERROR_MESSAGE, |
| 212 | }); |
| 213 | } |
| 214 | }; |
| 215 | |
| 216 | /** |
| 217 | * @typedef {Object} progressPathParams |
nothing calls this directly
no outgoing calls
no test coverage detected