LoadPLugins tests
This commit is contained in:
34
src/Backend/DiunaBI.WebAPI/Controllers/TestsController.cs
Normal file
34
src/Backend/DiunaBI.WebAPI/Controllers/TestsController.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user