This commit is contained in:
cjd
2025-11-04 21:09:16 +08:00
parent 8260e293c7
commit bb90a020dc
592 changed files with 61749 additions and 27 deletions

View File

@@ -0,0 +1,32 @@
using DouyinApi.SwaggerHelper;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using static DouyinApi.Extensions.CustomApiVersion;
namespace DouyinApi.Controllers.v2
{
[CustomRoute(ApiVersions.V2)]
//[Route("api/[controller]")]
[ApiController]
[Authorize(Permissions.Name)]
public class ApbController : ControllerBase
{
/************************************************/
// 如果需要使用Http协议带名称的比如这种 [HttpGet("apbs")]
// 目前只能把[CustomRoute(ApiVersions.v2)] 提到 controller 的上边做controller的特性
// 并且去掉//[Route("api/[controller]")]路由特性,否则会有两个接口
/************************************************/
[HttpGet("apbs")]
public IEnumerable<string> Get()
{
return new string[] { "第二版的 apbs" };
}
}
}