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

Method UpdateSubtask

backend/Controllers/TasksController.cs:147–167  ·  view source on GitHub ↗
(int subtaskId, [FromBody] UpdateSubtaskDto dto)

Source from the content-addressed store, hash-verified

145 }
146
147 [HttpPut("subtasks/{subtaskId}")]
148 public async Task<IActionResult> UpdateSubtask(int subtaskId, [FromBody] UpdateSubtaskDto dto)
149 {
150 try
151 {
152 int userId = GetUserId();
153 var subtask = await _taskService.UpdateSubtaskAsync(subtaskId, dto, userId);
154 if (subtask == null) return NotFound();
155
156 // Get Task to notify
157 var task = await _taskService.GetTaskByIdAsync(subtask.TaskCardId, userId);
158 if (task != null)
159 {
160 await _hubContext.Clients.Group($"board_{task.BoardId}")
161 .SendAsync("TaskUpdated", task);
162 }
163
164 return Ok(subtask);
165 }
166 catch (UnauthorizedAccessException) { return Forbid(); }
167 }
168
169 [HttpDelete("subtasks/{subtaskId}")]
170 public async Task<IActionResult> DeleteSubtask(int subtaskId)

Callers

nothing calls this directly

Calls 2

UpdateSubtaskAsyncMethod · 0.45
GetTaskByIdAsyncMethod · 0.45

Tested by

no test coverage detected