|
@@ -1568,7 +1568,20 @@ namespace TEAMModelOS.FunctionV4
|
|
|
n++;
|
|
|
task_error.Add(_azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, "Student").CreateItemAsync(error, new PartitionKey($"{error.code}")));
|
|
|
}
|
|
|
- string connect = _configuration.GetValue<string>("HaBookAuth:Crtmabank") + "/api/crtmabank";
|
|
|
+ //string connect = _configuration.GetValue<string>("HaBookAuth:Crtmabank") + "https://malearnfunction.chinacloudsites.cn/api/crtmabank";
|
|
|
+ string location = $"{Environment.GetEnvironmentVariable("Option:Location")}";
|
|
|
+ string urlAction = string.Empty;
|
|
|
+ if (location.Contains("China") || location.Contains("China-Dep"))
|
|
|
+ {
|
|
|
+ urlAction = "https://malearnfunction.chinacloudsites.cn";
|
|
|
+ }
|
|
|
+ else if (location.Contains("Global"))
|
|
|
+ {
|
|
|
+ urlAction = "https://malearnfunction.azurewebsites.net";
|
|
|
+ } else if (location.Contains("Global-Test")) {
|
|
|
+ urlAction = "https://malearn-test.azurewebsites.net";
|
|
|
+ }
|
|
|
+ string connect = $"{urlAction}/api/crtmabank";
|
|
|
var htc = _httpClient.CreateClient();
|
|
|
if (htc.DefaultRequestHeaders.Contains("x-functions-key"))
|
|
|
{
|