Merge branch 'dev' of https://gitea.nxsir.cn/nanxun/ql_apimanager_backend into dev
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Public
|
||||
{
|
||||
public class ApiCallContext
|
||||
{
|
||||
public int UserId { get; set; }
|
||||
public Dictionary<string, object> Parameters { get; set; } = new();
|
||||
public HttpContext HttpContext { get; set; } = null!;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace Public
|
||||
{
|
||||
public interface IBillableApiHandler
|
||||
{
|
||||
/// <summary>执行 API 主逻辑</summary>
|
||||
Task<object> ExecuteAsync(ApiCallContext context);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user