mirror of
https://github.com/EpinelPS/EpinelPS.git
synced 2025-12-13 15:34:36 +01:00
30 lines
724 B
C#
30 lines
724 B
C#
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));
|
|
}
|
|
}
|
|
}
|