Skip to content

Commit

Permalink
feat: update seed data (#327)
Browse files Browse the repository at this point in the history
Co-authored-by: 阎鹏举 <阎鹏举@DESKTOP-28NV352>
  • Loading branch information
codding-y and 阎鹏举 authored Jan 30, 2023
1 parent 9ec9b43 commit 6299c28
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/Services/Masa.Dcc.Service/Migrations/SeedData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,13 @@ public static async Task InitPublicConfigAsync(string contentRootPath, string en
var publicConfigs = new Dictionary<string, string>
{
{ "$public.RedisConfig",GetRedisConfig(contentRootPath,environment) },
{ "$public.AppSettings",GetAppSettings(contentRootPath,environment) },
{ "$public.Oidc",GetOidc(contentRootPath,environment) },
{ "$public.Cdn",GetCdn(contentRootPath,environment) },
{ "$public.Oss",GetOss(contentRootPath,environment) },
{ "$public.ES.UserAutoComplete",GetESUserAutoComplete(contentRootPath,environment) },
{ "$public.AliyunPhoneNumberLogin",GetAliyunPhoneNumberLogin(contentRootPath,environment) },
{ "$public.Email",GetEmail(contentRootPath,environment) },
{ "$public.Sms",GetSms(contentRootPath,environment) },
{ "$public.Clients",GetClient(contentRootPath,environment) }
{ "$public.WhiteListOptions",GetWhiteListOptions(contentRootPath,environment) }
};

await eventBus.PublishAsync(
Expand All @@ -138,15 +137,9 @@ private static string GetRedisConfig(string contentRootPath, string environment)
return File.ReadAllText(filePath);
}

private static string GetAppSettings(string contentRootPath, string environment)
private static string GetCdn(string contentRootPath, string environment)
{
var filePath = CombineFilePath(contentRootPath, "$public.AppSettings.json", environment);
return File.ReadAllText(filePath);
}

private static string GetOidc(string contentRootPath, string environment)
{
var filePath = CombineFilePath(contentRootPath, "$public.Oidc.json", environment);
var filePath = CombineFilePath(contentRootPath, "$public.Cdn.json", environment);
return File.ReadAllText(filePath);
}

Expand All @@ -156,9 +149,9 @@ private static string GetOss(string contentRootPath, string environment)
return File.ReadAllText(filePath);
}

private static string GetClient(string contentRootPath, string environment)
private static string GetWhiteListOptions(string contentRootPath, string environment)
{
var filePath = CombineFilePath(contentRootPath, "$public.Clients.json", environment);
var filePath = CombineFilePath(contentRootPath, "$public.WhiteListOptions.json", environment);
return File.ReadAllText(filePath);
}

Expand Down

0 comments on commit 6299c28

Please sign in to comment.