(int id, [FromBody] CreateColumnDto dto)
| 200 | } |
| 201 | |
| 202 | [HttpPost("{id}/columns")] |
| 203 | public async Task<IActionResult> CreateColumn(int id, [FromBody] CreateColumnDto dto) |
| 204 | { |
| 205 | var userId = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!); |
| 206 | try |
| 207 | { |
| 208 | var column = await _boardService.CreateColumnAsync(id, dto, userId); |
| 209 | |
| 210 | // Broadcast to other users |
| 211 | await _hubContext.Clients.Group($"board_{id}") |
| 212 | .SendAsync("ColumnCreated", column); |
| 213 | |
| 214 | return CreatedAtAction(nameof(GetBoardDetail), new { id = id }, column); |
| 215 | } |
| 216 | catch (KeyNotFoundException) |
| 217 | { |
| 218 | return NotFound(); |
| 219 | } |
| 220 | catch (UnauthorizedAccessException) |
| 221 | { |
| 222 | return Forbid(); |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | [HttpPut("{id}/columns/{columnId}/move")] |
| 227 | public async Task<IActionResult> MoveColumn(int id, int columnId, [FromBody] MoveColumnDto dto) |
nothing calls this directly
no test coverage detected