This commit is contained in:
@@ -101,7 +101,7 @@ namespace Sockeye.Api.Controllers
|
||||
TrialLicenseRequest o = await biz.CreateAsync(newObject);
|
||||
if (o == null)
|
||||
{
|
||||
var msg = ($"Unexpected error (code SE-444 was returned to customer) processing a new trial license request:{biz.GetErrorsAsString}");
|
||||
var msg = ($"Unexpected error (code SE-444 was returned to customer) processing a new trial license request:{biz.GetErrorsAsString}");
|
||||
log.LogError(msg);
|
||||
await NotifyEventHelper.AddOpsProblemEvent(msg);
|
||||
return BadRequest($"E1000 - Error processing request code SE-444 contact support");//don't want to leak any info so need to check sockeye log if get this error
|
||||
@@ -124,7 +124,7 @@ namespace Sockeye.Api.Controllers
|
||||
|
||||
|
||||
//is there a valid trial request
|
||||
var req = await ct.TrialLicenseRequest.AsNoTracking().Where(z => z.EmailConfirmCode == code && z.Status == TrialRequestStatus.AwaitingEmailValidation).FirstOrDefaultAsync();
|
||||
var req = await ct.TrialLicenseRequest.AsNoTracking().Where(z => z.EmailConfirmCode == code).FirstOrDefaultAsync();//&& z.Status == TrialRequestStatus.AwaitingEmailValidation
|
||||
if (req == null)
|
||||
{
|
||||
return new ContentResult
|
||||
@@ -135,6 +135,18 @@ namespace Sockeye.Api.Controllers
|
||||
};
|
||||
}
|
||||
|
||||
//Legit code but they already validated email, if so then just return that it's ok so they don't keep thinking something's wrong
|
||||
//but there's no need to keep processing it, it's done
|
||||
if (req.EmailValidated)
|
||||
{
|
||||
return new ContentResult
|
||||
{
|
||||
ContentType = "text/html",
|
||||
StatusCode = 200,
|
||||
Content = "<html><body><h4>Email validated!</h4><p>Your request will be reviewed and processed by our staff <strong>during business hours</strong>. You will receive an email with instructions for starting your AyaNova evaluation.</p></body></html>"
|
||||
};
|
||||
}
|
||||
|
||||
TrialLicenseRequestBiz biz = TrialLicenseRequestBiz.GetBiz(ct);
|
||||
var tlr = await biz.GetAsync(req.Id);
|
||||
if (tlr == null)
|
||||
|
||||
Reference in New Issue
Block a user