public async Task <IActionResult> DeleteAssignee(Guid taskId, Guid assigneeId) { var id = User.Claims.Where(c => c.Type == "Id").Select(c => c.Value).SingleOrDefault(); if (String.IsNullOrEmpty(id)) { return(Unauthorized()); } Guid actorId = new Guid(id); try { await _tasksService.DeleteAssignee(new GetTaskParticipationSpecification(taskId, assigneeId), actorId); return(Ok()); } catch (Exception e) { return(BadRequest(e.Message + " \nInner exception" + e.InnerException)); } }