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)
{

View File

@@ -33,7 +33,7 @@
},
"N8n": {
"WebhookUrl": "https://n8n.kai.managing.live/webhook/fa9308b6-983b-42ec-b085-71599d655951",
"IndicatorRequestWebhookUrl": "https://n8n.kai.managing.live/form-test/c7dd294c-004e-4c0f-b4ce-42cc19734e0e"
"IndicatorRequestWebhookUrl": "https://n8n.kai.managing.live/webhook/3aa07b66-1e64-46a7-8618-af300914cb11"
},
"Sentry": {
"Dsn": "https://fe12add48c56419bbdfa86227c188e7a@glitch.kai.managing.live/1",