public async Task <IActionResult> GetOperationsByJob(int userId, string jobNum) { if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value)) { return(Unauthorized()); } IEnumerable <Operation> directOperations = await _repo.GetOpsByJob(userId, jobNum); var ops = _mapper.Map <IEnumerable <OperationForReturnDto> >(directOperations); return(Ok(ops)); }