Пример #1
0
        public async Task <IActionResult> GetVerificatorLink(
            [FromQuery] Guid retailerId,
            [FromQuery] List <Guid> batchIds
            )
        {
            try
            {
                var rawVerificatorLink = verificationService.CreateVerificatorLink(retailerId, batchIds);
                var shortenedLink      = await verificationService.CreateShortenedLink(rawVerificatorLink);

                var base64QRCode = verificationService.CreateQRCode(shortenedLink);
                return(Ok(base64QRCode));
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, ex));
            }
        }