Initial commit

This commit is contained in:
Mikhail Thompson
2024-06-26 19:03:44 +03:00
commit 838240de58
72 changed files with 4171 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EmbedIO;
using Swan;
namespace nksrv.IntlServer
{
public class IntlReturnJsonHandler : IntlMsgHandler
{
private string JsonToReturn;
public override bool RequiresAuth => false;
public IntlReturnJsonHandler(string jsonToReturn)
{
JsonToReturn = jsonToReturn;
}
protected override async Task HandleAsync()
{
var str= await ctx.GetRequestBodyAsStringAsync();
string? seg = ctx.GetRequestQueryData().Get("seq");
WriteJsonString(JsonToReturn.Replace("((SEGID))", seg));
}
}
}