This commit is contained in:
@@ -124,7 +124,7 @@ namespace Sockeye.Api.Controllers
|
|||||||
|
|
||||||
|
|
||||||
//is there a valid trial request
|
//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)
|
if (req == null)
|
||||||
{
|
{
|
||||||
return new ContentResult
|
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);
|
TrialLicenseRequestBiz biz = TrialLicenseRequestBiz.GetBiz(ct);
|
||||||
var tlr = await biz.GetAsync(req.Id);
|
var tlr = await biz.GetAsync(req.Id);
|
||||||
if (tlr == null)
|
if (tlr == null)
|
||||||
|
|||||||
@@ -565,9 +565,10 @@ namespace Sockeye
|
|||||||
|
|
||||||
if (ServerBootConfig.SOCKEYE_PERMANENTLY_ERASE_DATABASE)
|
if (ServerBootConfig.SOCKEYE_PERMANENTLY_ERASE_DATABASE)
|
||||||
{
|
{
|
||||||
_newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - deleting and recreating database");
|
throw new InvalidOperationException("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - Sockeye must be erased via psql to protect data from accidental deletion");
|
||||||
Util.DbUtil.DropAndRecreateDbAsync(_newLog).Wait();
|
// _newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - deleting and recreating database");
|
||||||
AySchema.CheckAndUpdateAsync(dbContext, _newLog).Wait();
|
// Util.DbUtil.DropAndRecreateDbAsync(_newLog).Wait();
|
||||||
|
// AySchema.CheckAndUpdateAsync(dbContext, _newLog).Wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -663,12 +664,12 @@ namespace Sockeye
|
|||||||
Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
|
Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
|
||||||
|
|
||||||
|
|
||||||
if (ServerBootConfig.SOCKEYE_PERMANENTLY_ERASE_DATABASE)
|
// if (ServerBootConfig.SOCKEYE_PERMANENTLY_ERASE_DATABASE)
|
||||||
{
|
// {
|
||||||
_newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - IMPORTING ROCKFISH");
|
// _newLog.LogWarning("SOCKEYE_PERMANENTLY_ERASE_DATABASE has been set - IMPORTING ROCKFISH");
|
||||||
GlobalBizSettingsBiz.ImportRockfish(_newLog).Wait();
|
// GlobalBizSettingsBiz.ImportRockfish(_newLog).Wait();
|
||||||
_newLog.LogInformation("IMPORT COMPLETED");
|
// _newLog.LogInformation("IMPORT COMPLETED");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -41,7 +41,7 @@ namespace Sockeye.Biz
|
|||||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
//CREATE
|
//CREATE
|
||||||
//
|
//
|
||||||
internal async Task<TrialLicenseRequest> CreateAsync(TrialLicenseRequest newObject, bool importingDoNotNotify = false)
|
internal async Task<TrialLicenseRequest> CreateAsync(TrialLicenseRequest newObject)
|
||||||
{
|
{
|
||||||
await ValidateAsync(newObject, null);
|
await ValidateAsync(newObject, null);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
@@ -53,7 +53,6 @@ namespace Sockeye.Biz
|
|||||||
//Process a new request / Generate an email confirm code
|
//Process a new request / Generate an email confirm code
|
||||||
newObject.EmailConfirmCode = StringUtil.GenFetchCode();
|
newObject.EmailConfirmCode = StringUtil.GenFetchCode();
|
||||||
newObject.EmailValidated = false;
|
newObject.EmailValidated = false;
|
||||||
if (!importingDoNotNotify)
|
|
||||||
newObject.Status = TrialRequestStatus.AwaitingEmailValidation;
|
newObject.Status = TrialRequestStatus.AwaitingEmailValidation;
|
||||||
|
|
||||||
await ct.TrialLicenseRequest.AddAsync(newObject);
|
await ct.TrialLicenseRequest.AddAsync(newObject);
|
||||||
@@ -63,8 +62,7 @@ namespace Sockeye.Biz
|
|||||||
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
|
await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null);
|
||||||
|
|
||||||
|
|
||||||
if (!importingDoNotNotify)
|
|
||||||
{
|
|
||||||
//## ------------------ DEFAULT NOTIFICATIONS TO CUSTOMER ----------------
|
//## ------------------ DEFAULT NOTIFICATIONS TO CUSTOMER ----------------
|
||||||
//ValidateEmail request message,RavenTrialApproved (which sends pending manual generation message) and RavenTrialRejected messages are sent in this block
|
//ValidateEmail request message,RavenTrialApproved (which sends pending manual generation message) and RavenTrialRejected messages are sent in this block
|
||||||
//
|
//
|
||||||
@@ -93,7 +91,7 @@ namespace Sockeye.Biz
|
|||||||
AddError(ApiErrorCode.API_SERVER_ERROR, null, err + ExceptionUtil.ExtractAllExceptionMessages(ex));
|
AddError(ApiErrorCode.API_SERVER_ERROR, null, err + ExceptionUtil.ExtractAllExceptionMessages(ex));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
await HandlePotentialNotificationEvent(SockEvent.Created, newObject);
|
await HandlePotentialNotificationEvent(SockEvent.Created, newObject);
|
||||||
return newObject;
|
return newObject;
|
||||||
@@ -591,7 +589,7 @@ namespace Sockeye.Biz
|
|||||||
SockType = BizType,
|
SockType = BizType,
|
||||||
ObjectId = o.Id,
|
ObjectId = o.Id,
|
||||||
NotifySubscriptionId = sub.Id,
|
NotifySubscriptionId = sub.Id,
|
||||||
Name = $"{o.CompanyName} - trial license requested"
|
Name = o.CompanyName
|
||||||
};
|
};
|
||||||
await ct.NotifyEvent.AddAsync(n);
|
await ct.NotifyEvent.AddAsync(n);
|
||||||
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<GenerateFullPaths>true</GenerateFullPaths>
|
<GenerateFullPaths>true</GenerateFullPaths>
|
||||||
<Version>8.0.0</Version>
|
<Version>8.0.3</Version>
|
||||||
<FileVersion>8.0.0.0</FileVersion>
|
<FileVersion>8.0.3.0</FileVersion>
|
||||||
<ApplicationIcon>sockeye.ico</ApplicationIcon>
|
<ApplicationIcon>sockeye.ico</ApplicationIcon>
|
||||||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
|
||||||
<noWarn>1591</noWarn>
|
<noWarn>1591</noWarn>
|
||||||
|
|||||||
@@ -767,7 +767,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// 8.0.14 additions for job feedback
|
// 8.0.24 additions for job feedback
|
||||||
//
|
//
|
||||||
if (currentSchema < 8)
|
if (currentSchema < 8)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ namespace Sockeye.Util
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal static class SockeyeVersion
|
internal static class SockeyeVersion
|
||||||
{
|
{
|
||||||
public const string VersionString = "8.0.0";
|
public const string VersionString = "8.0.3";
|
||||||
public const string FullNameAndVersion = "Sockeye server " + VersionString;
|
public const string FullNameAndVersion = "Sockeye server " + VersionString;
|
||||||
public const string CurrentApiVersion="v8";
|
public const string CurrentApiVersion="v8";
|
||||||
}//eoc
|
}//eoc
|
||||||
|
|||||||
Reference in New Issue
Block a user