init
This commit is contained in:
29
DouyinApi.Api/Controllers/Test/SqlsugarTestController.cs
Normal file
29
DouyinApi.Api/Controllers/Test/SqlsugarTestController.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
using DouyinApi.Common;
|
||||
using DouyinApi.Controllers;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DouyinApi.Api.Controllers.Test;
|
||||
|
||||
[Route("api/[Controller]/[Action]")]
|
||||
[AllowAnonymous]
|
||||
public class SqlsugarTestController : BaseApiController
|
||||
{
|
||||
private readonly SqlSugarScope _db;
|
||||
|
||||
public SqlsugarTestController(SqlSugarScope db)
|
||||
{
|
||||
_db = db;
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
public async Task<IActionResult> Get()
|
||||
{
|
||||
Console.WriteLine(App.HttpContext.Request.Path);
|
||||
Console.WriteLine(App.HttpContext.RequestServices.ToString());
|
||||
Console.WriteLine(App.User?.ID);
|
||||
await Task.CompletedTask;
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user