From aa7026a17ededf7c181ed269c6388491d96e1b1e Mon Sep 17 00:00:00 2001 From: "Emma@Rory&" Date: Mon, 14 Aug 2023 05:07:51 +0200 Subject: Split LibMatrix into submodule --- .../Controllers/ValidationController.cs | 26 ---------------------- 1 file changed, 26 deletions(-) delete mode 100644 MatrixRoomUtils.DebugDataValidationApi/Controllers/ValidationController.cs (limited to 'MatrixRoomUtils.DebugDataValidationApi/Controllers') diff --git a/MatrixRoomUtils.DebugDataValidationApi/Controllers/ValidationController.cs b/MatrixRoomUtils.DebugDataValidationApi/Controllers/ValidationController.cs deleted file mode 100644 index 949871a..0000000 --- a/MatrixRoomUtils.DebugDataValidationApi/Controllers/ValidationController.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Text.Json; -using MatrixRoomUtils.Core.Extensions; -using Microsoft.AspNetCore.Mvc; - -namespace MatrixRoomUtils.DebugDataValidationApi.Controllers; - -[ApiController] -[Route("/")] -public class ValidationController : ControllerBase { - private readonly ILogger _logger; - - public ValidationController(ILogger logger) { - _logger = logger; - } - - [HttpPost("/validate/{type}")] - public async Task Get([FromRoute] string type, [FromBody] JsonElement content) { - Type 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, "$"); - } -} -- cgit 1.5.1