feat(esppOrderManager): вынесен шаблон поля Решение в настройки.
This commit is contained in:
@@ -4,7 +4,9 @@ using PARR.EsppApi.Models;
|
||||
using PARR.EsppApi.Models.Query;
|
||||
using PARR.EsppApi.Requests;
|
||||
using PARR.EsppApi.Settings;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Json;
|
||||
using System.Text.Unicode;
|
||||
|
||||
namespace PARR.EsppApi
|
||||
{
|
||||
@@ -138,18 +140,6 @@ namespace PARR.EsppApi
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Убирает из запроса запрещенные символы
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private string QuerySanitize(string str)
|
||||
{
|
||||
//str = str.Replace("\r\n", "<br/>");
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Формирует запрос в ЕСПП из строки
|
||||
/// </summary>
|
||||
@@ -173,7 +163,8 @@ namespace PARR.EsppApi
|
||||
/// <returns></returns>
|
||||
private string GenerateRequest<T>(EsppOperationsEnum operation, T jsonQuery)
|
||||
{
|
||||
var strQuery = JsonSerializer.Serialize(jsonQuery);
|
||||
var jsonOptions = new JsonSerializerOptions { Encoder = JavaScriptEncoder.Create(UnicodeRanges.All, UnicodeRanges.Cyrillic) };
|
||||
var strQuery = JsonSerializer.Serialize(jsonQuery, jsonOptions);
|
||||
|
||||
return GenerateRequest(operation, strQuery);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user