diff --git a/server/AyaNova/Startup.cs b/server/AyaNova/Startup.cs index 9a8df89b..ab62790e 100644 --- a/server/AyaNova/Startup.cs +++ b/server/AyaNova/Startup.cs @@ -34,7 +34,7 @@ namespace AyaNova { var nlogLoggerProvider = new NLogLoggerProvider(); _newLog = nlogLoggerProvider.CreateLogger("SERVER"); - _hostingEnvironment = hostingEnvironment; + _hostingEnvironment = hostingEnvironment; AyaNova.Util.ApplicationLogging.LoggerProvider = nlogLoggerProvider; ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH = hostingEnvironment.ContentRootPath; } @@ -43,7 +43,7 @@ namespace AyaNova private string _connectionString = ""; private readonly Microsoft.AspNetCore.Hosting.IWebHostEnvironment _hostingEnvironment; - + //////////////////////////////////////////////////////////// // @@ -119,8 +119,8 @@ namespace AyaNova _newLog.LogDebug("Ensuring user and backup folders exist and are separate locations..."); FileUtil.EnsureUserAndUtilityFoldersExistAndAreNotIdentical(_hostingEnvironment.ContentRootPath); - //TODO: ENsure report files here - + //TODO: ENsure report files here + #region DATABASE @@ -464,9 +464,9 @@ namespace AyaNova context.Request.HttpContext.Items["AY_TRANSLATION_ID"] = u.translationId; //Is import mode header set? - - context.Request.HttpContext.Items["AY_IMPORT_MODE"]= context.Request.Headers.ContainsKey("X-AY-Import-Mode"); - + if (context.Request.Headers.ContainsKey("X-AY-Import-Mode")) + context.Request.HttpContext.Items["AY_IMPORT_MODE"] = true; + //CHECK JWT if ( @@ -639,7 +639,7 @@ namespace AyaNova _newLog.LogInformation("Boot complete - server open"); //flag in console that server is open - Console.WriteLine("BOOT: COMPLETED - SERVER IS NOW OPEN"); + Console.WriteLine("BOOT: COMPLETED - SERVER IS NOW OPEN"); Console.WriteLine("(ctrl-c here will force stop AyaNova server. Controlled shut down via AyaNova APP Operations ServerState page)"); } diff --git a/server/AyaNova/biz/CustomerBiz.cs b/server/AyaNova/biz/CustomerBiz.cs index 2d965175..e8f77ba8 100644 --- a/server/AyaNova/biz/CustomerBiz.cs +++ b/server/AyaNova/biz/CustomerBiz.cs @@ -55,7 +55,10 @@ namespace AyaNova.Biz await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, BizType, AyaEvent.Created), ct); await SearchIndexAsync(newObject, true); await TagBiz.ProcessUpdateTagsInRepositoryAsync(ct, newObject.Tags, null); - await NotifyEventProcessor.HandlePotentialNotificationEvent(AyaEvent.Created, newObject); + if (!ImportMode) + await NotifyEventProcessor.HandlePotentialNotificationEvent(AyaEvent.Created, newObject); + else + newObject.TechNotes+="*"; return newObject; } }