This commit is contained in:
2020-06-14 18:18:40 +00:00
parent b25c5fac3c
commit 1561f932ee
2 changed files with 4 additions and 2 deletions

View File

@@ -484,7 +484,7 @@ namespace AyaNova.Core
/// <returns>Result string</returns>
internal static async Task<string> FetchKeyAsync(AyaNova.Api.ControllerHelpers.ApiServerState apiServerState, AyContext ct, ILogger log, bool calledFromInternalJob = true)
{
log.LogDebug($"Fetching license for DBID {LicenseDbId.ToString()}");
log.LogInformation($"Fetching license for DBID {LicenseDbId.ToString()}");
string sUrl = $"{LICENSE_SERVER_URL}rvf/{LicenseDbId.ToString()}";
try
{
@@ -498,9 +498,11 @@ namespace AyaNova.Core
var keyText = responseJson["data"]["key"].Value<string>();
AyaNovaLicenseKey ParsedKey = Parse(keyText, log);
if (ParsedKey != null)
{
await InstallAsync(keyText, ParsedKey, apiServerState, ct, log);
log.LogInformation($"Installed new license key {ParsedKey.Id}");
return "ok";
}
return $"E1020 - Error fetching license key: No key was returned";