Небольшие фиксы
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"]!);
});
builder.Services.AddSingleton<ModeusHttpClient>();
builder.Services.AddScoped<ModeusService>();
builder.Services.AddSingleton<ModeusService>();
builder.Services.AddHttpClient("authClient");
builder.Services.AddAuthentication()

View File

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

View File

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