This commit is contained in:
2020-06-18 00:00:19 +00:00
parent 1daa40a804
commit e5858bebd1
4 changed files with 327 additions and 314 deletions

View File

@@ -108,7 +108,10 @@ namespace rockfishCore.Controllers
newLicense.RegisteredTo = l.RegisteredTo;
newLicense.DbId = l.DbId;
newLicense.LicenseExpiration = DateUtil.EpochToDate(l.LicenseExpirationDate);
if (l.LicenseExpires)
newLicense.LicenseExpiration = DateUtil.EpochToDate(l.LicenseExpirationDate);
else
newLicense.LicenseExpiration = DateUtil.EmptyDateValue;
newLicense.MaintenanceExpiration = DateUtil.EpochToDate(l.MaintenanceExpirationDate);
foreach (dtoLicenseFeature f in l.Features)
{
@@ -125,6 +128,7 @@ namespace rockfishCore.Controllers
DBLicense.SiteId = l.SiteId;
DBLicense.Email = Customer.AdminEmail;
DBLicense.DbId = l.DbId;
DBLicense.Code = "na";
DBLicense.Key = Key;
DBLicense.RegTo = l.RegisteredTo;
await ct.License.AddAsync(DBLicense);
@@ -142,7 +146,7 @@ throw new System.Exception("UNCOMMENT THIS FOR PRODUCTION");
#endif
return NoContent();
return Ok("ok");
}
catch (Exception ex)
{