serilog test
This commit is contained in:
@@ -10,10 +10,14 @@ namespace DiunaBI.WebAPI.Controllers;
|
||||
public class TestsController : Controller
|
||||
{
|
||||
private readonly PluginManager _pluginManager;
|
||||
private readonly ILogger<LayersController> _logger;
|
||||
public TestsController(
|
||||
PluginManager pluginManager)
|
||||
PluginManager pluginManager,
|
||||
ILogger<LayersController> logger)
|
||||
{
|
||||
_pluginManager = pluginManager;
|
||||
_logger = logger;
|
||||
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
@@ -21,6 +25,18 @@ public class TestsController : Controller
|
||||
[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]
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
###
|
||||
GET https://localhost:/api/Layers/AutoProcess/{{apiKey}}
|
||||
GET http://localhost:5400/api/Tests/Ping
|
||||
@@ -1 +1,3 @@
|
||||
|
||||
INSERT INTO [diunabi-morska].[dbo].[Records]
|
||||
([Id], [Code], [Desc1], [CreatedAt], [ModifiedAt], [CreatedById], [ModifiedById], [IsDeleted], [LayerId])
|
||||
VALUES ((SELECT NEWID()), 'API-ENDPOINT', 'https://https://diunabi-morska.bim-it.pl/api/DataInbox/Add', GETDATE(), GETDATE(), '117be4f0-b5d1-41a1-a962-39dc30cce368', '117be4f0-b5d1-41a1-a962-39dc30cce368', 0, 'f5194e87-8af0-4bda-a1f9-f65352319922');
|
||||
Reference in New Issue
Block a user