diff --git a/SfeduSchedule/Jobs/UpdateJWTJob.cs b/SfeduSchedule/Jobs/UpdateJWTJob.cs index 91e1d0a..4064467 100644 --- a/SfeduSchedule/Jobs/UpdateJWTJob.cs +++ b/SfeduSchedule/Jobs/UpdateJWTJob.cs @@ -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; }