diff options
Diffstat (limited to '')
-rw-r--r-- | Utilities/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs | 5 |
1 files changed, 2 insertions, 3 deletions
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<ValidationController> logger) : ControllerBase { - private readonly ILogger<ValidationController> _logger = logger; [HttpPost("/validate/{type}")] public Task<bool> 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, "$")); } } |