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

Method UpdateComment

backend/Controllers/TasksController.cs:249–269  ·  view source on GitHub ↗
(int activityId, [FromBody] AddCommentDto dto)

Source from the content-addressed store, hash-verified

247 }
248
249 [HttpPut("activities/{activityId}")]
250 public async Task<IActionResult> UpdateComment(int activityId, [FromBody] AddCommentDto dto)
251 {
252 try
253 {
254 int userId = GetUserId();
255 var activity = await _taskService.UpdateActivityAsync(activityId, dto.Text, userId);
256 if (activity == null) return Forbid();
257
258 // Notify board
259 var task = await _taskService.GetTaskByIdAsync(activity.TaskCardId, userId);
260 if (task != null)
261 {
262 await _hubContext.Clients.Group($"board_{task.BoardId}")
263 .SendAsync("TaskUpdated", task);
264 }
265
266 return Ok(activity);
267 }
268 catch (UnauthorizedAccessException) { return Forbid(); }
269 }
270
271 [HttpPost("activities/{activityId}/reactions")]
272 public async Task<IActionResult> ToggleReaction(int activityId, [FromBody] ToggleReactionDto dto)

Callers

nothing calls this directly

Calls 2

UpdateActivityAsyncMethod · 0.45
GetTaskByIdAsyncMethod · 0.45

Tested by

no test coverage detected