Remove doc required
This commit is contained in:
@@ -190,7 +190,8 @@ public class TradingController : BaseController
|
|||||||
// Check if user has permission to initialize this address
|
// Check if user has permission to initialize this address
|
||||||
if (!await CanUserInitializeAddress(user.Name, publicAddress))
|
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);
|
var result = await _tradingService.InitPrivyWallet(publicAddress, TradingExchanges.GmxV2);
|
||||||
@@ -231,16 +232,19 @@ public class TradingController : BaseController
|
|||||||
|
|
||||||
if (account?.User?.Name == userName)
|
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;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -268,11 +272,6 @@ public class TradingController : BaseController
|
|||||||
return BadRequest("Strategy is required.");
|
return BadRequest("Strategy is required.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(request.DocumentationUrl))
|
|
||||||
{
|
|
||||||
return BadRequest("Documentation URL is required.");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (string.IsNullOrWhiteSpace(request.RequesterName))
|
if (string.IsNullOrWhiteSpace(request.RequesterName))
|
||||||
{
|
{
|
||||||
return BadRequest("Requester name is required.");
|
return BadRequest("Requester name is required.");
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
#nullable enable
|
#nullable enable
|
||||||
|
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace Managing.Api.Models.Requests;
|
namespace Managing.Api.Models.Requests;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -10,17 +12,19 @@ public class IndicatorRequestDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of the indicator (e.g., "MACD", "RSI", "Bollinger Bands")
|
/// Name of the indicator (e.g., "MACD", "RSI", "Bollinger Bands")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string IndicatorName { get; set; } = string.Empty;
|
[Required]
|
||||||
|
public string IndicatorName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Strategy or description of how the indicator is used (e.g., "MACD Cross", "RSI Divergence")
|
/// Strategy or description of how the indicator is used (e.g., "MACD Cross", "RSI Divergence")
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public string StrategyDescription { get; set; } = string.Empty;
|
public string StrategyDescription { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Primary documentation URL for the indicator
|
/// Primary documentation URL for the indicator
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DocumentationUrl { get; set; } = string.Empty;
|
public string? DocumentationUrl { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Image URL for the indicator (optional) - can be a chart, diagram, or visual representation
|
/// Image URL for the indicator (optional) - can be a chart, diagram, or visual representation
|
||||||
@@ -30,6 +34,6 @@ public class IndicatorRequestDto
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of the person requesting the indicator
|
/// Name of the person requesting the indicator
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Required]
|
||||||
public string RequesterName { get; set; } = string.Empty;
|
public string RequesterName { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user