Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
HaikAsatryan committed Aug 27, 2024
1 parent b3164bf commit 54b337d
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ namespace Pandatech.VerticalSlices.SharedKernel.Helpers;

public static class ConfigurationHelper
{
private const string AesKey = "Security:AESKey";
private const string RedisUrl = "Redis";
private const string RabbitMqUrl = "RabbitMq";
private const string PostgresUrl = "Postgres";
private const string CorsOrigins = "Security:AllowedCorsOrigins";
private const string HangfireUser = "Security:Hangfire:Username";
private const string HangfirePassword = "Security:Hangfire:Password";
private const string SuperUsername = "Security:SuperUser:Username";
private const string SuperUserPassword = "Security:SuperUser:Password";
private const string AesKeyConfigurationPath = "Security:AESKey";
private const string RedisConfigurationPath = "Redis";
private const string RabbitMqConfigurationPath = "RabbitMq";
private const string PostgresConfigurationPath = "Postgres";
private const string CorsOriginsConfigurationPath = "Security:AllowedCorsOrigins";
private const string HangfireUserConfigurationPath = "Security:Hangfire:Username";
private const string HangfirePasswordConfigurationPath = "Security:Hangfire:Password";
private const string SuperUsernameConfigurationPath = "Security:SuperUser:Username";
private const string SuperUserPasswordConfigurationPath = "Security:SuperUser:Password";
private const string PersistentConfigurationPath = "PersistentStorage";
private const string RepositoryNameConfigurationPath = "RepositoryName";

Expand All @@ -32,46 +32,46 @@ public static string GetPersistentPath(this IConfiguration configuration)

public static string GetAesKey(this IConfiguration configuration)
{
return configuration[AesKey]!;
return configuration[AesKeyConfigurationPath]!;
}

public static string GetRedisUrl(this IConfiguration configuration)
{
return configuration.GetConnectionString(RedisUrl)!;
return configuration.GetConnectionString(RedisConfigurationPath)!;
}

public static string GetRabbitMqUrl(this IConfiguration configuration)
{
return configuration.GetConnectionString(RabbitMqUrl)!;
return configuration.GetConnectionString(RabbitMqConfigurationPath)!;
}

public static string GetPostgresUrl(this IConfiguration configuration)
{
return configuration.GetConnectionString(PostgresUrl)!;
return configuration.GetConnectionString(PostgresConfigurationPath)!;
}

public static string GetAllowedCorsOrigins(this IConfiguration configuration)
{
return configuration[CorsOrigins]!;
return configuration[CorsOriginsConfigurationPath]!;
}

public static string GetHangfireUsername(this IConfiguration configuration)
{
return configuration[HangfireUser]!;
return configuration[HangfireUserConfigurationPath]!;
}

public static string GetHangfirePassword(this IConfiguration configuration)
{
return configuration[HangfirePassword]!;
return configuration[HangfirePasswordConfigurationPath]!;
}

public static string GetSuperUsername(this IConfiguration configuration)
{
return configuration[SuperUsername]!;
return configuration[SuperUsernameConfigurationPath]!;
}

public static string GetSuperuserPassword(this IConfiguration configuration)
{
return configuration[SuperUserPassword]!;
return configuration[SuperUserPasswordConfigurationPath]!;
}
}
2 changes: 1 addition & 1 deletion src/Pandatech.VerticalSlices/appsettings.Development.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"RepositoryName": "be-tmp-vertical-slices",
"ConnectionStrings": {
"Postgres": "**",
"PersistentStorage": "/persistent",
"PersistentStorage": "/persistence",
"Redis": "**",
"RabbitMq": "**"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Pandatech.VerticalSlices/appsettings.Production.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"RepositoryName": "be-tmp-vertical-slices",
"ConnectionStrings": {
"Postgres": "**",
"PersistentStorage": "/persistent",
"PersistentStorage": "/persistence",
"Redis": "**",
"RabbitMq": "**"
},
Expand Down
2 changes: 1 addition & 1 deletion src/Pandatech.VerticalSlices/appsettings.QA.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"RepositoryName": "be-tmp-vertical-slices",
"ConnectionStrings": {
"Postgres": "**",
"PersistentStorage": "/persistent",
"PersistentStorage": "/persistence",
"Redis": "**",
"RabbitMq": "**"
},
Expand Down

0 comments on commit 54b337d

Please sign in to comment.