Exemple #1
0
        public ActionResult VerifyPackage(string packageId)
        {
            try
            {
                (bool, string)result = _indexService.VerifyPackage(packageId);

                return(new JsonResult(new
                {
                    success = new
                    {
                        isValid = result.Item1,
                        description = result.Item2
                    }
                }));
            }
            catch (Exception ex)
            {
                _log.LogError(ex, "An unexpected error occurred.");
                return(Responses.UnexpectedError());
            }
        }