serilog test
All checks were successful
BuildApp / build-frontend (push) Successful in 1m1s
BuildApp / build-backend (push) Successful in 1m27s

This commit is contained in:
Michał Zieliński
2025-10-21 10:49:24 +02:00
parent 5d33a5a9a5
commit 66b650119b
3 changed files with 21 additions and 3 deletions

View File

@@ -10,10 +10,14 @@ namespace DiunaBI.WebAPI.Controllers;
public class TestsController : Controller public class TestsController : Controller
{ {
private readonly PluginManager _pluginManager; private readonly PluginManager _pluginManager;
private readonly ILogger<LayersController> _logger;
public TestsController( public TestsController(
PluginManager pluginManager) PluginManager pluginManager,
ILogger<LayersController> logger)
{ {
_pluginManager = pluginManager; _pluginManager = pluginManager;
_logger = logger;
} }
[HttpGet] [HttpGet]
@@ -21,6 +25,18 @@ public class TestsController : Controller
[AllowAnonymous] [AllowAnonymous]
public IActionResult Ping() 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"); return Ok("Pong");
} }
[HttpGet] [HttpGet]

View File

@@ -1,2 +1,2 @@
### ###
GET https://localhost:/api/Layers/AutoProcess/{{apiKey}} GET http://localhost:5400/api/Tests/Ping

View File

@@ -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');