using Microsoft.AspNetCore.Components.Authorization; using SytelineSaAppEfDataModel.Dtos; namespace OrdersManagement.Services; public class ErrorLogService( IHttpClientFactory httpClientFactory, CustomAuthenticationStateProvider authenticationStateProvider) : ServiceBase(httpClientFactory, authenticationStateProvider) { public async Task?> GetErrorLogsAsync(Guid customerOrderNumber) { try { return await GetListAsync($"api/CustomerOrders/by-order-number/?customerOrderNumber={customerOrderNumber}"); } catch (HttpRequestException ex) { Console.WriteLine($"Błąd HTTP w GetCustomerOrdersAsync: {ex.Message}"); return null; } } }