From f951df80a41290e76b996025045e1d84c6f78309 Mon Sep 17 00:00:00 2001 From: Eric Nguyen Date: Wed, 27 Sep 2023 18:47:50 +0700 Subject: [PATCH] update --- .github/workflows/develop_dev-mixcore.yml | 2 +- src/applications/Mixcore/Domain/Bases/MvcBaseController.cs | 4 ++-- src/platform/mix.library/Base/MixControllerBase.cs | 2 +- .../mix.library/Startup/_ServiceCollectionExtensions.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/develop_dev-mixcore.yml b/.github/workflows/develop_dev-mixcore.yml index ed3737fdb..dd29dd84b 100644 --- a/.github/workflows/develop_dev-mixcore.yml +++ b/.github/workflows/develop_dev-mixcore.yml @@ -6,7 +6,7 @@ name: Build and deploy ASP.Net Core app to Azure Web App - dev-mixcore on: push: branches: - - develop + - features/cleanup-startup workflow_dispatch: jobs: diff --git a/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs b/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs index 4aa9cd3da..394e7810d 100644 --- a/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs +++ b/src/applications/Mixcore/Domain/Bases/MvcBaseController.cs @@ -35,7 +35,7 @@ protected override void ValidateRequest() base.ValidateRequest(); // If this site has not been inited yet - if (GlobalConfigService.Instance.AppSettings.IsInit) + if (GlobalConfig.IsInit) { IsValid = false; if (string.IsNullOrEmpty(DatabaseService.GetConnectionString(MixConstants.CONST_CMS_CONNECTION))) @@ -44,7 +44,7 @@ protected override void ValidateRequest() } else { - var status = GlobalConfigService.Instance.AppSettings.InitStatus; + var status = GlobalConfig.InitStatus; RedirectUrl = $"/init/step{status}"; } } diff --git a/src/platform/mix.library/Base/MixControllerBase.cs b/src/platform/mix.library/Base/MixControllerBase.cs index 1f401228e..b3e29c645 100644 --- a/src/platform/mix.library/Base/MixControllerBase.cs +++ b/src/platform/mix.library/Base/MixControllerBase.cs @@ -96,7 +96,7 @@ private void LoadCulture() public override Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { - if (!GlobalConfigService.Instance.AppSettings.IsInit) + if (!GlobalConfig.IsInit) { LoadCulture(); } diff --git a/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs b/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs index 5f9c17d2f..88b00db13 100644 --- a/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs +++ b/src/platform/mix.library/Startup/_ServiceCollectionExtensions.cs @@ -29,7 +29,7 @@ public static List MixAssemblies public static IServiceCollection AddMixServices(this IServiceCollection services, Assembly executingAssembly, IConfiguration configuration) { - var options = configuration.Get(); + var globalConfig = configuration.Get(); services.AddMvc().AddSessionStateTempDataProvider(); services.TryAddSingleton(); services.AddSession(options => @@ -49,7 +49,7 @@ public static IServiceCollection AddMixServices(this IServiceCollection services services.AddHttpClient(); services.AddLogging(); - services.ApplyMigrations(options); + services.ApplyMigrations(globalConfig); services.AddQueues(executingAssembly, configuration);