Ejemplo n.º 1
0
        public ActionResult <ReportDto> GetReport(string id)
        {
            string token = HttpContext.Request.Headers["token"];

            if (token != TokenEmulator)
            {
                return(Unauthorized());
            }
            var report = _reports.GetReportById(id);

            return(report == default ? NotFound() : DtoConverter.ConvertReportToDto(report));
        }