ПИбд-23 Салин Олег Алексеевич Лабораторная работа №5 (Усложненная) #20

Closed
Oleja123 wants to merge 40 commits from Lab5_Hard into Lab5
Showing only changes of commit 679d76fa48 - Show all commits

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);
}
}