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

Function getTask

controllers/tasks.js:286–300  ·  view source on GitHub ↗
(req, res)

Source from the content-addressed store, hash-verified

284};
285
286const getTask = async (req, res) => {
287 try {
288 const taskId = req.params.id;
289 const { taskData, dependencyDocReference } = await tasks.fetchTask(taskId);
290 if (!taskData) {
291 return res.boom.notFound("Task not found");
292 }
293 return res.json({
294 message: "task returned successfully",
295 taskData: { ...taskData, dependsOn: dependencyDocReference },
296 });
297 } catch (err) {
298 return res.boom.badImplementation(INTERNAL_SERVER_ERROR);
299 }
300};
301/**
302 * Updates the task
303 *

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected