Фикс сохранения токена доступа
Some checks failed
Create and publish a Docker image / Publish image (push) Failing after 12s
Some checks failed
Create and publish a Docker image / Publish image (push) Failing after 12s
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using ModeusSchedule.Abstractions;
|
||||
using Quartz;
|
||||
|
||||
namespace SfeduSchedule.Jobs;
|
||||
@@ -15,7 +16,7 @@ public class UpdateJwtJob(
|
||||
{
|
||||
logger.LogInformation("Начало выполнения UpdateJwtJob");
|
||||
|
||||
var authUrl = configuration["AUTH_URL"] ?? "http://msauth/auth/ms";
|
||||
var authUrl = configuration["AUTH_URL"] ?? "http://msauth:8080/auth/ms";
|
||||
var apiKey = configuration["AUTH_API_KEY"] ?? string.Empty;
|
||||
|
||||
var client = httpClientFactory.CreateClient("authClient");
|
||||
@@ -67,6 +68,7 @@ public class UpdateJwtJob(
|
||||
}
|
||||
|
||||
configuration["TOKEN"] = body.Jwt;
|
||||
await File.WriteAllTextAsync(GlobalConsts.JwtFilePath, body.Jwt + "\n" + DateTime.Now.ToString("O"), cts.Token);
|
||||
logger.LogInformation("JWT успешно обновлён");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user