Refactoring: Added interfaces, custom exceptions, UserManager unit tests, dependency injection/inversion; Regex match search by date, keywords

This commit is contained in:
Dimitar Byalkov
2023-06-06 17:52:36 +02:00
parent 180b261d37
commit 53c42a35d8
43 changed files with 668 additions and 211 deletions

View File

@@ -1,3 +1,4 @@
using Data;
using Logic;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
@@ -29,7 +30,7 @@ namespace WebApp.Pages
}
public void OnPost()
{
UserManager userManager = new UserManager();
UserManager userManager = new UserManager(new UserRepository());
User user = userManager.GetUserById(int.Parse(User.FindFirstValue("id")));
if (NewPassword == null)
{