34 lines
764 B
C#
34 lines
764 B
C#
using DiunaBI.Core.Services;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace DiunaBI.WebAPI.Controllers;
|
|
|
|
[ApiController]
|
|
[Route("api/[controller]")]
|
|
[Authorize]
|
|
public class TestsController : Controller
|
|
{
|
|
private readonly PluginManager _pluginManager;
|
|
public TestsController(
|
|
PluginManager pluginManager)
|
|
{
|
|
_pluginManager = pluginManager;
|
|
}
|
|
|
|
[HttpGet]
|
|
[Route("Ping")]
|
|
[AllowAnonymous]
|
|
public IActionResult Ping()
|
|
{
|
|
return Ok("Pong");
|
|
}
|
|
[HttpGet]
|
|
[Route("Plugins")]
|
|
[AllowAnonymous]
|
|
public IActionResult GetPlugins()
|
|
{
|
|
var plugins = _pluginManager.GetPluginsCount();
|
|
return Ok(plugins);
|
|
}
|
|
} |