Небольшие фиксы
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 41s
All checks were successful
Create and publish a Docker image / Publish image (push) Successful in 41s
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user