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

Method DeleteComment

backend/Controllers/TasksController.cs:224–247  ·  view source on GitHub ↗
(int activityId)

Source from the content-addressed store, hash-verified

222 }
223
224 [HttpDelete("activities/{activityId}")]
225 public async Task<IActionResult> DeleteComment(int activityId)
226 {
227 try
228 {
229 int userId = GetUserId();
230 var activity = await _taskService.GetActivityByIdAsync(activityId);
231 if (activity == null) return NotFound();
232
233 var result = await _taskService.DeleteActivityAsync(activityId, userId);
234 if (!result) return Forbid();
235
236 // Notify board
237 var task = await _taskService.GetTaskByIdAsync(activity.TaskCardId, userId);
238 if (task != null)
239 {
240 await _hubContext.Clients.Group($"board_{task.BoardId}")
241 .SendAsync("TaskUpdated", task);
242 }
243
244 return NoContent();
245 }
246 catch (UnauthorizedAccessException) { return Forbid(); }
247 }
248
249 [HttpPut("activities/{activityId}")]
250 public async Task<IActionResult> UpdateComment(int activityId, [FromBody] AddCommentDto dto)

Callers

nothing calls this directly

Calls 3

GetActivityByIdAsyncMethod · 0.45
DeleteActivityAsyncMethod · 0.45
GetTaskByIdAsyncMethod · 0.45

Tested by

no test coverage detected