MCPcopy Create free account
hub / github.com/GmpABR/NexusFlow / CreateTask

Method CreateTask

backend/Controllers/TasksController.cs:30–44  ·  view source on GitHub ↗
([FromBody] CreateTaskDto dto)

Source from the content-addressed store, hash-verified

28
29
30 [HttpPost]
31 public async Task<IActionResult> CreateTask([FromBody] CreateTaskDto dto)
32 {
33 try
34 {
35 var task = await _taskService.CreateTaskAsync(dto, GetUserId());
36
37 // Notify all clients viewing the board
38 await _hubContext.Clients.Group($"board_{task.BoardId}")
39 .SendAsync("TaskCreated", task);
40
41 return CreatedAtAction(null, new { id = task.Id }, task);
42 }
43 catch (UnauthorizedAccessException) { return Forbid(); }
44 }
45
46 [HttpPut("{id}")]
47 public async Task<IActionResult> UpdateTask(int id, [FromBody] UpdateTaskDto dto)

Callers

nothing calls this directly

Calls 1

CreateTaskAsyncMethod · 0.45

Tested by

no test coverage detected