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

Method RemoveLabel

backend/Controllers/TasksController.cs:338–357  ·  view source on GitHub ↗
(int id, int labelId)

Source from the content-addressed store, hash-verified

336 }
337
338 [HttpDelete("{id}/labels/{labelId}")]
339 public async Task<IActionResult> RemoveLabel(int id, int labelId)
340 {
341 try
342 {
343 int userId = GetUserId();
344 var result = await _taskService.RemoveLabelFromTaskAsync(id, labelId, userId);
345 if (!result) return NotFound();
346
347 var task = await _taskService.GetTaskByIdAsync(id, userId);
348 if (task != null)
349 {
350 await _hubContext.Clients.Group($"board_{task.BoardId}")
351 .SendAsync("TaskUpdated", task);
352 }
353
354 return NoContent();
355 }
356 catch (UnauthorizedAccessException) { return Forbid(); }
357 }
358
359 private int GetUserId()
360 {

Callers

nothing calls this directly

Calls 2

GetTaskByIdAsyncMethod · 0.45

Tested by

no test coverage detected