Skip to content

Commit c46e68b

Browse files
committed
refactor: Check for old apikey name as well
1 parent d5f31d1 commit c46e68b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

BaseService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public BaseService(string serviceId)
4141
}
4242

4343
string ApiKey = Environment.GetEnvironmentVariable(serviceId.ToUpper() + "_IAM_APIKEY");
44+
// check for old IAM API key name as well
45+
if (string.IsNullOrEmpty(apiKey)) {
46+
apiKey = Environment.GetEnvironmentVariable(ServiceName.ToUpper() + "_APIKEY");
47+
}
4448
string Username = Environment.GetEnvironmentVariable(serviceId.ToUpper() + "_USERNAME");
4549
string Password = Environment.GetEnvironmentVariable(serviceId.ToUpper() + "_PASSWORD");
4650
string ServiceUrl = Environment.GetEnvironmentVariable(serviceId.ToUpper() + "_URL");

0 commit comments

Comments
 (0)