Esempio n. 1
0
        public override async Task <ActionResult <IEnumerable <ReportDto> > > HandleAsync(CancellationToken cancellationToken = default)
        {
            var user = _userAccessor.Get();

            if (user == null)
            {
                return(Unauthorized());
            }
            var query = new GetReportsQuery(user.UserId, user.CompanyId);

            return(Ok(await _mediator.Send(query)));
        }