Remove doc required

This commit is contained in:
2025-10-28 17:55:41 +07:00
parent da908d7da2
commit 1181a0920a
2 changed files with 38 additions and 35 deletions

View File

@@ -190,7 +190,8 @@ public class TradingController : BaseController
// Check if user has permission to initialize this address
if (!await CanUserInitializeAddress(user.Name, publicAddress))
{
return Forbid("You don't have permission to initialize this wallet address. You can only initialize your own wallet addresses.");
return Forbid(
"You don't have permission to initialize this wallet address. You can only initialize your own wallet addresses.");
}
var result = await _tradingService.InitPrivyWallet(publicAddress, TradingExchanges.GmxV2);
@@ -231,16 +232,19 @@ public class TradingController : BaseController
if (account?.User?.Name == userName)
{
_logger.LogInformation("User {UserName} initializing their own address {Address}", userName, publicAddress);
_logger.LogInformation("User {UserName} initializing their own address {Address}", userName,
publicAddress);
return true;
}
_logger.LogWarning("User {UserName} attempted to initialize address {Address} that doesn't belong to them", userName, publicAddress);
_logger.LogWarning("User {UserName} attempted to initialize address {Address} that doesn't belong to them",
userName, publicAddress);
return false;
}
catch (Exception ex)
{
_logger.LogWarning(ex, "Unable to verify ownership of address {Address} for user {UserName}", publicAddress, userName);
_logger.LogWarning(ex, "Unable to verify ownership of address {Address} for user {UserName}", publicAddress,
userName);
return false;
}
}
@@ -268,11 +272,6 @@ public class TradingController : BaseController
return BadRequest("Strategy is required.");
}
if (string.IsNullOrWhiteSpace(request.DocumentationUrl))
{
return BadRequest("Documentation URL is required.");
}
if (string.IsNullOrWhiteSpace(request.RequesterName))
{
return BadRequest("Requester name is required.");

View File

@@ -1,5 +1,7 @@
#nullable enable
using System.ComponentModel.DataAnnotations;
namespace Managing.Api.Models.Requests;
/// <summary>
@@ -10,17 +12,19 @@ public class IndicatorRequestDto
/// <summary>
/// Name of the indicator (e.g., "MACD", "RSI", "Bollinger Bands")
/// </summary>
public string IndicatorName { get; set; } = string.Empty;
[Required]
public string IndicatorName { get; set; }
/// <summary>
/// Strategy or description of how the indicator is used (e.g., "MACD Cross", "RSI Divergence")
/// </summary>
[Required]
public string StrategyDescription { get; set; } = string.Empty;
/// <summary>
/// Primary documentation URL for the indicator
/// </summary>
public string DocumentationUrl { get; set; } = string.Empty;
public string? DocumentationUrl { get; set; }
/// <summary>
/// Image URL for the indicator (optional) - can be a chart, diagram, or visual representation
@@ -30,6 +34,6 @@ public class IndicatorRequestDto
/// <summary>
/// Name of the person requesting the indicator
/// </summary>
[Required]
public string RequesterName { get; set; } = string.Empty;
}