(int id, [FromBody] string role)
| 266 | } |
| 267 | |
| 268 | [HttpPost("{id}/invites")] |
| 269 | public async Task<IActionResult> CreateInvite(int id, [FromBody] string role) |
| 270 | { |
| 271 | var userId = int.Parse(User.FindFirstValue(ClaimTypes.NameIdentifier)!); |
| 272 | try |
| 273 | { |
| 274 | var invite = await _boardService.CreateBoardInviteAsync(id, role, userId); |
| 275 | return Ok(invite); |
| 276 | } |
| 277 | catch (UnauthorizedAccessException ex) |
| 278 | { |
| 279 | return Forbid(ex.Message); |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | [HttpGet("invites/{token}")] |
| 284 | [AllowAnonymous] |
nothing calls this directly
no test coverage detected