Небольшие фиксы
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 41s

This commit is contained in:
2025-11-26 16:23:58 +03:00
parent bed42a83bf
commit 3f30812d7a
3 changed files with 8 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ builder.Services.AddHttpClient("modeus", client =>
client.BaseAddress = new Uri(configuration["MODEUS_URL"]!); client.BaseAddress = new Uri(configuration["MODEUS_URL"]!);
}); });
builder.Services.AddSingleton<ModeusHttpClient>(); builder.Services.AddSingleton<ModeusHttpClient>();
builder.Services.AddScoped<ModeusService>(); builder.Services.AddSingleton<ModeusService>();
builder.Services.AddHttpClient("authClient"); builder.Services.AddHttpClient("authClient");
builder.Services.AddAuthentication() builder.Services.AddAuthentication()

View File

@@ -24,7 +24,7 @@ public class ModeusHttpClient
public void SetToken(string? token) public void SetToken(string? token)
{ {
if (string.IsNullOrWhiteSpace(token)) { if (string.IsNullOrWhiteSpace(token)) {
_logger.LogErrorHere("Предоставленный токен пустой."); _logger.LogInformationHere("Предоставленный токен пустой.");
return; return;
} }

View File

@@ -32,7 +32,7 @@ public class ModeusService
if (schedule == null) if (schedule == null)
{ {
_logger.LogErrorHere($"schedule is null. {JsonSerializer.Serialize(msr, GlobalConsts.JsonSerializerOptions)}"); _logger.LogErrorHere($"schedule is null. {JsonSerializer.Serialize(msr, GlobalConsts.JsonSerializerOptions)}");
throw new Exception("Schedule is null"); return null;
} }
Schedule? scheduleJson; Schedule? scheduleJson;
@@ -198,6 +198,11 @@ public class ModeusService
{ {
return await _modeusHttpClient.GetGuidAsync(fullname); return await _modeusHttpClient.GetGuidAsync(fullname);
} }
public async Task<List<Attendees>> GetAttendeesAsync(Guid eventId)
{
return await _modeusHttpClient.GetAttendeesAsync(eventId);
}
#endregion #endregion
} }