Refactor VPN configuration handling to remove device limit management
- Updated the VPN configuration commands and handlers to eliminate the device limit parameter, simplifying the configuration process. - Adjusted related API documentation to reflect the removal of device limit management, clarifying that this setting is now handled directly in the 3x-ui by node administrators. - Enhanced the overall codebase by removing unnecessary device limit references across various components, ensuring a cleaner and more maintainable code structure.
This commit is contained in:
@@ -44,14 +44,14 @@ public static class ConfigEndpoints
|
||||
|
||||
private static async Task<IResult> CreateConfig(CreateConfigBody body, ISender sender, CancellationToken cancellationToken)
|
||||
{
|
||||
var command = new CreateVpnConfigCommand(body.InboundId, body.Label, body.DeviceLimit);
|
||||
var command = new CreateVpnConfigCommand(body.InboundId, body.Label);
|
||||
var result = await sender.Send(command, cancellationToken);
|
||||
return result.ToHttpResult();
|
||||
}
|
||||
|
||||
private static async Task<IResult> EditConfig(Guid id, EditConfigBody body, ISender sender, CancellationToken cancellationToken)
|
||||
{
|
||||
var command = new EditVpnConfigCommand(id, body.Label, body.DeviceLimit);
|
||||
var command = new EditVpnConfigCommand(id, body.Label);
|
||||
var result = await sender.Send(command, cancellationToken);
|
||||
return result.ToHttpResult();
|
||||
}
|
||||
@@ -89,9 +89,9 @@ public static class ConfigEndpoints
|
||||
}
|
||||
}
|
||||
|
||||
public sealed record CreateConfigBody(Guid InboundId, string? Label, int? DeviceLimit);
|
||||
public sealed record CreateConfigBody(Guid InboundId, string? Label);
|
||||
|
||||
public sealed record EditConfigBody(string? Label, int? DeviceLimit);
|
||||
public sealed record EditConfigBody(string? Label);
|
||||
|
||||
public sealed record ConfigLinkResponseDto(string ConnectionString, string SubscriptionUrl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user