1
This commit is contained in:
18
Extensions/IDISExtensions.cs
Normal file
18
Extensions/IDISExtensions.cs
Normal 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
|
||||
};
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user