([FromBody] CreateTaskDto dto)
| 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) |
nothing calls this directly
no test coverage detected