регистрация работает
This commit is contained in:
parent
cade6df340
commit
bc7055257d
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user