Implemented missing code for trial request to generate proper subscription / perpetual keys on request
Removed unused or implemented main navigation item raven license key as it's done through trial requests or customer only
This commit is contained in:
@@ -26,6 +26,7 @@ namespace rockfishCore.Controllers
|
||||
{
|
||||
[Required]
|
||||
public string DbId { get; set; }
|
||||
public bool Perpetual { get; set; } = true;//not required and default true to not break any older beta testers out there, can set to required in future
|
||||
[Required, EmailAddress]
|
||||
public string Email { get; set; }
|
||||
[Required]
|
||||
@@ -51,8 +52,8 @@ namespace rockfishCore.Controllers
|
||||
return BadRequest(ModelState);
|
||||
}
|
||||
|
||||
// if (r.DbId == Guid.Empty)
|
||||
if(string.IsNullOrWhiteSpace(r.DbId))
|
||||
// if (r.DbId == Guid.Empty)
|
||||
if (string.IsNullOrWhiteSpace(r.DbId))
|
||||
{
|
||||
return BadRequest("E1000 - DBId invalid");
|
||||
}
|
||||
@@ -70,7 +71,7 @@ namespace rockfishCore.Controllers
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//if there is an active trial for this db then can't do this they must request we re-release it or completely zap the database instead
|
||||
var MustBeOlderThan = DateUtil.DateToEpoch(DateTime.Now.AddDays((RavenKeyFactory.TRIAL_PERIOD_DAYS * -1)));
|
||||
@@ -85,6 +86,7 @@ namespace rockfishCore.Controllers
|
||||
NewRequest.DbId = r.DbId;
|
||||
NewRequest.CompanyName = r.Company;
|
||||
NewRequest.ContactName = r.Contact;
|
||||
NewRequest.Perpetual=r.Perpetual;
|
||||
await ct.TrialRequest.AddAsync(NewRequest);
|
||||
await ct.SaveChangesAsync();
|
||||
NewRequest.EmailConfirmCode = NewRequest.Id.ToString() + FetchKeyCode.generate();
|
||||
|
||||
Reference in New Issue
Block a user