Update to webhook

This commit is contained in:
2025-10-28 17:46:05 +07:00
parent 9d586974e2
commit da908d7da2
4 changed files with 63 additions and 10 deletions

View File

@@ -290,21 +290,14 @@ public class TradingController : BaseController
var httpClient = _httpClientFactory.CreateClient();
// Create multipart form data content
using var content = new MultipartFormDataContent();
content.Add(new StringContent(request.IndicatorName), "field-0");
content.Add(new StringContent(request.StrategyDescription), "field-1");
content.Add(new StringContent(request.DocumentationUrl), "field-2");
content.Add(new StringContent(request.ImageUrl ?? string.Empty), "field-3");
content.Add(new StringContent(request.RequesterName), "field-4");
_logger.LogInformation(
"Submitting indicator request: {IndicatorName} - {Strategy} by {Requester}",
request.IndicatorName,
request.StrategyDescription,
request.RequesterName);
var response = await httpClient.PostAsync(webhookUrl, content);
// Send as JSON payload
var response = await httpClient.PostAsJsonAsync(webhookUrl, request);
if (response.IsSuccessStatusCode)
{