public async Task <IActionResult> GetListOfWorks([FromQuery] GetListOfWorksCommand command)
        {
            command.ReviewerId = HttpContext.User.Identity.Name;
            IEnumerable <ScientificWorkWithStatusDto> scientificWorks;

            try
            {
                scientificWorks = await CommandAsync(command);
            }
            catch (AuthenticationException)
            {
                return(Unauthorized());
            }

            return(Ok(scientificWorks));
        }
Пример #2
0
        public async Task<IEnumerable<ScientificWorkWithStatusDto>> Handle(GetListOfWorksCommand request, CancellationToken cancellationToken)
        {
            var reviewerId = uint.Parse(request.ReviewerId);

            return await _scientificWorkRepository.GetListOfWorksForReviewer(reviewerId);
        }