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

Function createTrackedProgressController

controllers/monitor.js:46–67  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

44 */
45
46const createTrackedProgressController = async (req, res) => {
47 try {
48 const data = await createTrackedProgressDocument({ ...req.body });
49 return res.status(201).json({
50 message: RESOURCE_CREATED_SUCCESSFULLY,
51 data,
52 });
53 } catch (error) {
54 if (error instanceof Conflict) {
55 return res.status(409).json({
56 message: error.message,
57 });
58 } else if (error instanceof NotFound) {
59 return res.status(404).json({
60 message: error.message,
61 });
62 }
63 return res.status(500).json({
64 message: INTERNAL_SERVER_ERROR_MESSAGE,
65 });
66 }
67};
68
69/**
70 * @typedef {Object} UpdateTrackedProgressRequestParams

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected