diff --git a/server/biz/GlobalBizSettingsBiz.cs b/server/biz/GlobalBizSettingsBiz.cs index 8eb4939..eeeddfc 100644 --- a/server/biz/GlobalBizSettingsBiz.cs +++ b/server/biz/GlobalBizSettingsBiz.cs @@ -297,7 +297,7 @@ namespace Sockeye.Biz }//end of all customers iteration #endregion customers - + #region CASES /* log.LogInformation("RFImport Cases"); @@ -419,7 +419,7 @@ namespace Sockeye.Biz res = await client.GetAsync($"{URL_ROCKFISH}api/license/{jLicenseListItem["id"].Value()}"); responseText = await res.Content.ReadAsStringAsync(); var jLicense = JObject.Parse(responseText); - log.LogInformation($"Importing license:{responseText}"); + // log.LogInformation($"Importing license:{responseText}"); /* {"regTo":"PDI Technologies","customerName":"PDI Technologies","dtcreated":1672261044,"email":"jberkel@pdisoftware.com","code":"na","fetched":true,"dtfetched":1672262347,"fetchFrom":null, "key":"[KEY\n{\n \"Key\": {\n \"LicenseFormat\": \"8\",\n \"Id\": \"1672261044\",\n \"RegisteredTo\": \"PDI Technologies\",\n \"DBID\": \"R6U37uNUN2hSQideG6Gg+MqoQY8vuUeyHFI6Kv7VDsE=\",\n \"Perpetual\": true,\n \"LicenseExpiration\": \"5555-01-01T00:00:00\",\n \"MaintenanceExpiration\": \"2023-12-28T00:00:00\",\n \"Features\": [\n {\n \"Name\": \"ActiveInternalUsers\",\n \"Count\": 5\n }\n ]\n }\n}\nKEY]\n[SIGNATURE\nkzVs8GH0MSIfsR7ZYQ5x+5wdVDJqpfOYvTfBCx32Vs+zqP7h89uUKI17jTx5rMvkOYX40GyJt0pTWOzltljzf+MaoTzoSvTsSPkWtdVWv8ZGOXUUdaZhzMoTJGxTg0JHka/8S5tLkTiuct3x+voiLAKXuFCp9TSZo4+UnejB6U2Bp6MfdZxLtKVZ/1RLu/h4SnP8ZbczuwbQReB1z4k4IRwjh5GHnUUm6YqZg/04m1X9FEeKQZQfGZk/qZ788jONbLQb4CLnq0/ZmIteeocDDBz59TYaC9BHwHp73y8jyPfEugVfyH2AE0J8ZILiFiozYQ7meP5X4ZOmd1nhTA8MkA==\nSIGNATURE]\n" @@ -491,7 +491,7 @@ namespace Sockeye.Biz string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(KeyText, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1"); var jKey = JObject.Parse(keyNoWS); l.LicenseExpire = DateTime.MaxValue; - l.MaintenanceExpire = DateUtil.EpochToDateNullIsMin(jKey["Expires"].Value()); + l.MaintenanceExpire = jKey["Key"]["Expires"].Value(); l.FetchCode = jLicense["code"].Value(); l.Tags.Add("v7"); } @@ -519,13 +519,13 @@ namespace Sockeye.Biz */ string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(KeyText, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1"); var jKey = JObject.Parse(keyNoWS); - l.DbId = jKey["DBID"].Value(); - l.LicenseExpire = DateUtil.EpochToDateNullIsMin(jKey["LicenseExpiration"].Value()); - l.MaintenanceExpire = DateUtil.EpochToDateNullIsMin(jKey["MaintenanceExpiration"].Value()); + l.DbId = jKey["Key"]["DBID"].Value(); + l.LicenseExpire = jKey["Key"]["LicenseExpiration"].Value(); + l.MaintenanceExpire = jKey["Key"]["MaintenanceExpiration"].Value(); l.Tags.Add("raven"); } - l.Created = (DateTime)DateUtil.EpochToDateNullIsNull(jLicense["dtCreated"].Value()); + l.Created = (DateTime)DateUtil.EpochToDateNullIsNull(jLicense["dtcreated"].Value()); l.FetchedOn = DateUtil.EpochToDateNullIsNull(jLicense["dtfetched"].Value()); l.FetchEmail = jLicense["email"].Value(); l.Key = jLicense["key"].Value();