refactor 优化代码

This commit is contained in:
2024-11-26 15:26:12 +08:00
parent a32910f0d9
commit 623a5c4e49
88 changed files with 1820 additions and 941 deletions

View File

@@ -0,0 +1,22 @@
using System.Text;
using Kurisu.RemoteCall;
using Kurisu.RemoteCall.Abstractions;
using Newtonsoft.Json;
namespace Dlhis.Basic.Api.ContentHandlers;
public class CodeContentHandler : IContentHandler
{
/// <inheritdoc />
public HttpContent Create(List<ParameterValue> values)
{
var code = values.First(x => x.Parameter.Name == "code").GetValue<string>();
var obj = new
{
code,
};
var json = JsonConvert.SerializeObject(obj);
return new StringContent(json, Encoding.UTF8, "application/json");
}
}