SyncService + SyncPage added
This commit is contained in:
@@ -10,23 +10,15 @@ using System.Threading.Tasks;
|
||||
using WorkFlowCheck.Common.DTO;
|
||||
using System.Text.Json.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using WorkFlowCheck.MAUI.DataLayer;
|
||||
|
||||
namespace WorkFlowCheck.MAUI.Services
|
||||
{
|
||||
public class UserService : IUserService
|
||||
public class UserService : BaseService, IUserService
|
||||
{
|
||||
private readonly HttpClient _httpClient;
|
||||
|
||||
public UserDTO? CurrentUser { get; private set; }
|
||||
public UserService(HttpClient httpClient, IConfiguration configuration)
|
||||
public UserService(HttpClient httpClient, IConfiguration configuration, AppDbContext dbContext) : base(httpClient, configuration, dbContext)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
|
||||
var apiBaseUrl = configuration["ApiBaseUrl"]; // API-cím elérése a konfigurációból
|
||||
_httpClient.BaseAddress = new Uri(apiBaseUrl);
|
||||
|
||||
var apiKey = configuration["ApiKey"];
|
||||
_httpClient.DefaultRequestHeaders.Add("X-Api-Key", apiKey);
|
||||
}
|
||||
public async Task<ApiResponseDTO<UserDTO>> GetUserAsync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user