регистрация работает

This commit is contained in:
Николай 2023-05-15 19:12:19 +04:00 committed by dasha
parent cade6df340
commit bc7055257d

View File

@ -28,7 +28,7 @@ namespace HardwareShopWorkerApp.Controllers
{
throw new Exception("Введите логин, email, пароль");
}
APIClient.PostRequest("api/client/register", new UserBindingModel
APIClient.PostRequest("api/user/register", new UserBindingModel
{
Login = login,
Email = email,
@ -67,6 +67,11 @@ namespace HardwareShopWorkerApp.Controllers
{
throw new Exception("Введите почту и пароль");
}
APIClient.User = APIClient.GetRequest<UserViewModel>($"api/user/login?email={email}&password={password}");
if (APIClient.User == null)
{
throw new Exception("Неверные почта и/или пароль");
}
Response.Redirect("MainWorker");
}