Сдано

This commit is contained in:
gg12 darfren 2024-04-16 12:30:25 +04:00
parent bdb15b04aa
commit 679d76fa48

View File

@ -9,11 +9,11 @@ namespace IceCreamShopsApp
{
private static readonly HttpClient _client = new();
private static string Password = string.Empty;
private static string password = string.Empty;
public static bool Access { get; private set; } = false;
public static void Connect(IConfiguration configuration)
{
Password = configuration["Password"];
password = configuration["Password"];
_client.BaseAddress = new Uri(configuration["IPAddress"]);
_client.DefaultRequestHeaders.Accept.Clear();
_client.DefaultRequestHeaders.Accept.Add(new
@ -45,9 +45,9 @@ namespace IceCreamShopsApp
}
}
public static bool CheckPassword(string password)
public static bool CheckPassword(string _password)
{
return Access = (password == Password);
return Access = (_password == password);
}
}