feat: WebAppUserRepository und WebAppUserHelper als Scoped-Dienste zur Service-Collection hinzugefügt
This commit is contained in:
parent
d01a3b955b
commit
bc04c2d36d
@ -40,6 +40,7 @@ namespace DAL
|
||||
services.AddScoped<WindreamSearchRepository>();
|
||||
services.AddScoped<WindreamSearchToDepartmentRepository>();
|
||||
services.AddScoped<WebAppEmployeeInfoRepository>();
|
||||
services.AddScoped<WebAppUserRepository>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user