利用中间件+特性解决minimal api 项目拦截功能

This commit is contained in:
2024-10-25 11:02:10 +08:00
parent 5023f5ed31
commit 77a11cacc2
6 changed files with 382 additions and 21 deletions
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using IRaCIS.Core.Application.BusinessFilter;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc;
using System;
@@ -24,7 +25,7 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
{
[TrialGlobalLimit("AddOrUpdateTrial", "BeforeOngoingCantOpt", "AfterStopCannNotOpt")]
public Task<List<string>> GetProjectList1Async()
{
var list = new List<string>()
@@ -37,6 +38,7 @@ namespace IRaCIS.Core.Application.Service.MinimalApiService
}
[AllowAnonymous]
[TrialGlobalLimit( "BeforeOngoingCantOpt")]
public IResponseOutput GetTest()
{