after refactor cleanup

This commit is contained in:
2025-11-28 11:21:22 +01:00
parent 5db6de1503
commit 07423023a0
305 changed files with 80 additions and 13326 deletions

View File

@@ -0,0 +1,50 @@
using DiunaBI.Infrastructure.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace DiunaBI.API.Controllers;
[ApiController]
[Route("[controller]")]
[Authorize]
public class TestsController : Controller
{
private readonly PluginManager _pluginManager;
private readonly ILogger<LayersController> _logger;
public TestsController(
PluginManager pluginManager,
ILogger<LayersController> logger)
{
_pluginManager = pluginManager;
_logger = logger;
}
[HttpGet]
[Route("Ping")]
[AllowAnonymous]
public IActionResult Ping()
{
var tmp = new
{
a = 2,
b = "test"
};
var tmp2 = new
{
a = 2,
b = "test"
};
var user = User.Identity;
_logger.LogInformation("LogTest: OldValue {tmp}, NewValue {tmp2}, ChangedBy: {user}", tmp, tmp2, user?.Name);
return Ok("Pong");
}
[HttpGet]
[Route("Plugins")]
[AllowAnonymous]
public IActionResult GetPlugins()
{
var plugins = _pluginManager.GetPluginsCount();
return Ok(plugins);
}
}