2023-02-04 18:06:42 +08:00
|
|
|
using Hei.Captcha;
|
2023-01-29 21:13:20 +08:00
|
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using StartupModules;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Yi.Framework.Core.Attributes;
|
|
|
|
|
using Yi.Framework.Data;
|
2023-02-19 20:57:31 +08:00
|
|
|
using Yi.Framework.EventBus;
|
2023-02-04 18:06:42 +08:00
|
|
|
using Yi.Framework.ThumbnailSharp;
|
2023-02-21 19:37:48 +08:00
|
|
|
using Yi.RBAC.Domain.Logs;
|
2023-01-29 21:13:20 +08:00
|
|
|
using Yi.RBAC.Domain.Shared;
|
|
|
|
|
|
|
|
|
|
namespace Yi.RBAC.Domain
|
|
|
|
|
{
|
|
|
|
|
[DependsOn(
|
|
|
|
|
typeof(YiRBACDomainSharedModule),
|
2023-02-04 18:06:42 +08:00
|
|
|
typeof(YiFrameworkDataModule),
|
2023-02-19 20:57:31 +08:00
|
|
|
typeof(YiFrameworkThumbnailSharpModule),
|
|
|
|
|
typeof(YiFrameworkEventBusModule)
|
2023-01-29 21:13:20 +08:00
|
|
|
)]
|
|
|
|
|
public class YiRBACDomainModule : IStartupModule
|
|
|
|
|
{
|
|
|
|
|
public void Configure(IApplicationBuilder app, ConfigureMiddlewareContext context)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ConfigureServices(IServiceCollection services, ConfigureServicesContext context)
|
|
|
|
|
{
|
2023-02-04 18:06:42 +08:00
|
|
|
services.AddHeiCaptcha();
|
2023-02-21 19:37:48 +08:00
|
|
|
services.AddControllers(options => {
|
|
|
|
|
options.Filters.Add<GlobalOperLogAttribute>();
|
|
|
|
|
});
|
|
|
|
|
services.AddSingleton<GlobalOperLogAttribute>();
|
2023-01-29 21:13:20 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|