case 4217

This commit is contained in:
2022-10-25 19:54:35 +00:00
parent 9f4c04cc32
commit c14cbbfcd2
8 changed files with 29 additions and 60 deletions

View File

@@ -562,15 +562,6 @@ namespace AyaNova
#if (DEBUG)
if (ServerBootConfig.AYANOVA_SERVER_TEST_MODE)
{
_newLog.LogWarning("AYANOVA_SERVER_TEST_MODE, dropping and recreating database");
Util.DbUtil.DropAndRecreateDbAsync(_newLog).Wait();
AySchema.CheckAndUpdateAsync(dbContext, _newLog).Wait();
}
else
#endif
if (ServerBootConfig.AYANOVA_PERMANENTLY_ERASE_DATABASE)
{
@@ -651,16 +642,6 @@ namespace AyaNova
TranslationBiz lb = new TranslationBiz(dbContext, 1, ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID, AuthorizationRoles.OpsAdmin);
lb.ValidateTranslationsAsync().Wait();
#if (DEBUG)
if (ServerBootConfig.AYANOVA_SERVER_TEST_MODE)
{
_newLog.LogInformation($"Server test mode seeding, level is {ServerBootConfig.AYANOVA_SERVER_TEST_MODE_SEEDLEVEL}, tz offset is {ServerBootConfig.AYANOVA_SERVER_TEST_MODE_TZ_OFFSET}");
AyaNova.Core.License.FetchKeyAsync(apiServerState, dbContext, _newLog, true, true).Wait();
var seed = new Util.Seeder();
seed.SeedDatabaseAsync(Seeder.Level.StringToSeedLevel(ServerBootConfig.AYANOVA_SERVER_TEST_MODE_SEEDLEVEL), ServerBootConfig.AYANOVA_SERVER_TEST_MODE_TZ_OFFSET, null, null).Wait();
// _newLog.LogInformation("Seeding completed");
}
#endif
//SPA FALLBACK ROUTE
app.Use(async (context, next) =>