Update to webhook
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user