Example #1
0
        public async Task <IActionResult> GetProductionSetByJobOpAndMachine(int userId, string job, string op, string mach)
        {
            if (userId != int.Parse(User.FindFirst(ClaimTypes.NameIdentifier).Value))
            {
                return(Unauthorized());
            }

            IEnumerable <Production> directProductions = await _repo.GetProductionSetByJobOpAndMachine(userId, job, op, mach);

            var productionSet = _mapper.Map <IEnumerable <ProdForReturnDto> >(directProductions);

            return(Ok(productionSet));
        }