public ActionResult <IEnumerable <AssignmentViewModel> > AutoAssignDuties([FromBody] AutoAssignViewModel model) { var currentUserId = User.Claims.FirstOrDefault(c => c.Type.Equals(ClaimTypes.NameIdentifier))?.Value; return(Ok(_mapper.Map <IEnumerable <AssignmentViewModel> >( _assignmentService.AutoAssignDuties(model.AssignmentIds, currentUserId)))); }