feat: WebAppUserRepository und WebAppUserHelper als Scoped-Dienste zur Service-Collection hinzugefügt

This commit is contained in:
Developer 02 2024-08-05 13:10:07 +02:00
parent d01a3b955b
commit bc04c2d36d
3 changed files with 6 additions and 2 deletions

View File

@ -40,6 +40,7 @@ namespace DAL
services.AddScoped<WindreamSearchRepository>();
services.AddScoped<WindreamSearchToDepartmentRepository>();
services.AddScoped<WebAppEmployeeInfoRepository>();
services.AddScoped<WebAppUserRepository>();
return services;
}

View File

@ -16,6 +16,7 @@ using System.Reflection;
using HRD.LDAPService.JWT;
using HRD.WebApi.DAL.Middleware;
using HRD.WebApi.Helpers;
using StaffDBServer.SharedControllers;
AppDomain.CurrentDomain.UnhandledException += (object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs) =>
{
@ -54,6 +55,8 @@ try
});
builder.Services.AddStaffDBRepositories();
builder.Services.AddScoped<WebAppUserHelper>();
builder.Services.ConfigureWebApiExtensionsEnd(); // should come last
var app = builder.Build();

View File

@ -11,11 +11,11 @@ using System.Threading.Tasks;
namespace StaffDBServer.SharedControllers
{
[JWTAuthorizeAttribute]
[JWTAuthorize]
public class WebAppUserController : BaseMiniController
{
private readonly WebAppUserRepository webAppUserRepository;
WebAppUserHelper webAppUserHelper;
private readonly WebAppUserHelper webAppUserHelper;
public WebAppUserController(WebApiContext context, WebAppUserRepository webAppUserRepository, WebAppUserHelper webAppUserHelper) : base(context)
{