Исправлен переход после регистрации

This commit is contained in:
Николай 2023-04-03 10:45:33 +04:00
parent 26966f9c8c
commit 8cddd1067c

View File

@ -61,7 +61,7 @@ namespace HardwareShopClientApp.Controllers
} }
[HttpPost] [HttpPost]
public void Enter(string email, string password) public IActionResult Enter(string email, string password)
{ {
if (string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password)) if (string.IsNullOrEmpty(email) || string.IsNullOrEmpty(password))
{ {
@ -74,11 +74,11 @@ namespace HardwareShopClientApp.Controllers
} }
if ((int)APIClient.User.Role == 1) if ((int)APIClient.User.Role == 1)
{ {
RedirectToAction("MainWorker", "Worker"); return RedirectToAction("MainWorker", "Worker");
} }
else else
{ {
RedirectToAction("Goods", "Storekeeper"); return RedirectToAction("Goods", "Storekeeper");
} }
} }
} }