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

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

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

            return(Ok(productionSet));
        }