From 5affd9f061e75f6575a2fe6715f9e8757cfe87e8 Mon Sep 17 00:00:00 2001 From: "Emma [it/its]@Rory&" Date: Thu, 14 Dec 2023 07:20:46 +0100 Subject: Cleanup --- .../Controllers/ValidationController.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Utilities/LibMatrix.DebugDataValidationApi') diff --git a/Utilities/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs b/Utilities/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs index 81753d1..1b93614 100644 --- a/Utilities/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs +++ b/Utilities/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs @@ -7,16 +7,15 @@ namespace LibMatrix.DebugDataValidationApi.Controllers; [ApiController] [Route("/")] public class ValidationController(ILogger logger) : ControllerBase { - private readonly ILogger _logger = logger; [HttpPost("/validate/{type}")] public Task Get([FromRoute] string type, [FromBody] JsonElement content) { var t = Type.GetType(type); if (t is null) { - Console.WriteLine($"Type `{type}` does not exist!"); + logger.LogWarning($"Type `{type}` does not exist!"); throw new ArgumentException($"Unknown type {type}!"); } - Console.WriteLine($"Validating {type}..."); + logger.LogInformation($"Validating {type}..."); return Task.FromResult(content.FindExtraJsonElementFields(t, "$")); } } -- cgit 1.4.1