diff --git a/Controllers/RvlController.cs b/Controllers/RvlController.cs index b55a463..7a4502c 100644 --- a/Controllers/RvlController.cs +++ b/Controllers/RvlController.cs @@ -12,11 +12,11 @@ using System.ComponentModel.DataAnnotations; namespace rockfishCore.Controllers { - //### OUR ROUTE CALLED FROM ROCKFISH CLIENT #### + //### OUR ROUTE CALLED FROM ROCKFISH CLIENT #### [Produces("application/json")] [Route("rvl")] [Authorize] - public class RvlController : Controller + public class RvlController : Controller { private readonly rockfishContext ct; @@ -33,7 +33,7 @@ namespace rockfishCore.Controllers [Required] public Guid DbId { get; set; } [Required] - public bool LicenseExpires {get;set;} + public bool LicenseExpires { get; set; } [Required] public long LicenseExpiration { get; set; } [Required] @@ -56,13 +56,13 @@ namespace rockfishCore.Controllers } -#if (DEBUG) - private const string LICENSE_SERVER_URL = "http://localhost:3001/"; - public const string SUPPORT_EMAIL = "cardjohn@ayanova.com"; -#else - private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/"; - public const string SUPPORT_EMAIL="support@ayanova.com"; -#endif + // #if (DEBUG) + // private const string LICENSE_SERVER_URL = "http://localhost:3001/"; + // public const string SUPPORT_EMAIL = "cardjohn@ayanova.com"; + // #else + // private const string LICENSE_SERVER_URL = "https://rockfish.ayanova.com/"; + // public const string SUPPORT_EMAIL="support@ayanova.com"; + // #endif [HttpPost] public async Task Post([FromBody] dtoRavLicense l) @@ -144,42 +144,14 @@ namespace rockfishCore.Controllers } + [HttpGet("list/{siteId}")] + public async Task GetList(long siteId) + { + return Ok(await ct.License.AsNoTracking().Where(z => z.SiteId == siteId).OrderByDescending(z => z.Id).ToListAsync()); + } - // [HttpGet("verify/{code}")] - // public async Task GetVerify([FromRoute] string code) - // { - // //is there a valid trial request - // var req = await ct.TrialRequest.Where(z => z.EmailConfirmCode == code && z.DtFetched == null && z.Status == TrialRequest.TrialRequestStatus.NotSet).FirstOrDefaultAsync(); - // if (req == null) - // { - // return new ContentResult - // { - // ContentType = "text/html", - // StatusCode = 200, - // Content = "

Request not found

There was no evaluation request associated with this verification code.

" - // }; - // } - - // req.EmailValidated = true; - // await ct.SaveChangesAsync(); - - // //notify *us* - // //http://localhost:3001/default.htm#!/trials/[id] - // var rfUrl = LICENSE_SERVER_URL + $"default.htm#!/trialEdit/{req.Id}"; - // var body = $"Email address {req.Email} was just verified for {req.ContactName} at {req.CompanyName}.\r\nTrial key is ready to be processed now:\r\n{rfUrl}"; - // //send confirmation email - // RfMail.SendMessage("support@ayanova.com", SUPPORT_EMAIL, "AyaNova trial request requiring action", body, false); - - // return new ContentResult - // { - // ContentType = "text/html", - // StatusCode = 200, - // Content = "

Email validated!

Your request is being processed and you will receive an email with instructions for starting your AyaNova evaluation.

" - // }; - // } - }//eoc }//eons \ No newline at end of file diff --git a/wwwroot/js/app.ravLicenses.js b/wwwroot/js/app.ravLicenses.js index b4f5d2f..9086492 100644 --- a/wwwroot/js/app.ravLicenses.js +++ b/wwwroot/js/app.ravLicenses.js @@ -55,39 +55,19 @@ app.ravLicenses = (function() { $appList.append('");