This commit is contained in:
CortexCore
2024-04-29 23:05:47 +08:00
parent 4c6f979db5
commit 0c573029b3
10 changed files with 252 additions and 121 deletions

View File

@@ -0,0 +1,18 @@
using IDIS;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace IDIS_Server_SIM.Extensions;
public static class IDISExtensions
{
public static IActionResult ToActionResult(this IDIS_Response response)
{
return new ContentResult()
{
Content = JsonConvert.SerializeObject(response),
ContentType = "application/json",
StatusCode = 200
};
}
}