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

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

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

            return(Ok(productionSet));
        }