(req, res)
| 106 | */ |
| 107 | |
| 108 | const updateTrackedProgressController = async (req, res) => { |
| 109 | try { |
| 110 | const data = await updateTrackedProgressDocument({ ...req }); |
| 111 | return res.status(200).json({ |
| 112 | data, |
| 113 | message: RESOURCE_UPDATED_SUCCESSFULLY, |
| 114 | }); |
| 115 | } catch (error) { |
| 116 | if (error instanceof NotFound) { |
| 117 | return res.status(404).json({ |
| 118 | message: error.message, |
| 119 | }); |
| 120 | } |
| 121 | return res.status(500).json({ |
| 122 | message: INTERNAL_SERVER_ERROR_MESSAGE, |
| 123 | }); |
| 124 | } |
| 125 | }; |
| 126 | |
| 127 | /** |
| 128 | * @typedef {Object} GetTrackedProgressRequestParams |
nothing calls this directly
no test coverage detected