From cb8846a7a3310f8513989da5aadb5202f048a1b3 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 14 Aug 2023 19:46:11 +0200 Subject: Code cleanup --- .../Controllers/ValidationController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'LibMatrix.DebugDataValidationApi/Controllers') diff --git a/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs b/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs index 1599f35..4dbee54 100644 --- a/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs +++ b/LibMatrix.DebugDataValidationApi/Controllers/ValidationController.cs @@ -14,13 +14,13 @@ public class ValidationController : ControllerBase { } [HttpPost("/validate/{type}")] - public async Task Get([FromRoute] string type, [FromBody] JsonElement content) { - Type t = Type.GetType(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!"); throw new ArgumentException($"Unknown type {type}!"); } Console.WriteLine($"Validating {type}..."); - return content.FindExtraJsonElementFields(t, "$"); + return Task.FromResult(content.FindExtraJsonElementFields(t, "$")); } } -- cgit 1.4.1