Enhance inbound management by removing MaxClients property
- Removed the MaxClients property from Inbound-related data models, including InboundDto and PublishInboundCommand. - Updated related methods and handlers to reflect the removal of MaxClients, ensuring consistent behavior across the application. - Adjusted API documentation and frontend components to remove references to MaxClients, streamlining the inbound publishing process. - Enhanced logging in command handlers to handle node unavailability scenarios during user actions. - Improved database schema and migrations to align with the updated data model.
This commit is contained in:
+12
-4
@@ -1,3 +1,4 @@
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NSubstitute;
|
||||
using PnvPanel.Application.Admin.Users;
|
||||
using PnvPanel.Application.Common.Interfaces;
|
||||
@@ -16,6 +17,9 @@ public class DeleteUserCommandHandlerTests
|
||||
private readonly IXuiPanelGateway _gateway = Substitute.For<IXuiPanelGateway>();
|
||||
private readonly ITelegramNotifier _telegramNotifier = Substitute.For<ITelegramNotifier>();
|
||||
private readonly ICurrentUser _currentUser = Substitute.For<ICurrentUser>();
|
||||
private readonly ILogger<DeleteUserCommandHandler> _logger = Substitute.For<
|
||||
ILogger<DeleteUserCommandHandler>
|
||||
>();
|
||||
|
||||
[Fact]
|
||||
public async Task Handle_WhenAdminTargetsSelf_ReturnsCannotDeleteSelfWithoutTouchingConfigs()
|
||||
@@ -29,7 +33,8 @@ public class DeleteUserCommandHandlerTests
|
||||
_identityService,
|
||||
_gateway,
|
||||
_telegramNotifier,
|
||||
_currentUser
|
||||
_currentUser,
|
||||
_logger
|
||||
);
|
||||
|
||||
var result = await handler.Handle(new DeleteUserCommand(adminId), CancellationToken.None);
|
||||
@@ -82,7 +87,8 @@ public class DeleteUserCommandHandlerTests
|
||||
_identityService,
|
||||
_gateway,
|
||||
_telegramNotifier,
|
||||
_currentUser
|
||||
_currentUser,
|
||||
_logger
|
||||
);
|
||||
|
||||
var result = await handler.Handle(new DeleteUserCommand(userId), CancellationToken.None);
|
||||
@@ -125,7 +131,8 @@ public class DeleteUserCommandHandlerTests
|
||||
_identityService,
|
||||
_gateway,
|
||||
_telegramNotifier,
|
||||
_currentUser
|
||||
_currentUser,
|
||||
_logger
|
||||
);
|
||||
|
||||
var result = await handler.Handle(new DeleteUserCommand(userId), CancellationToken.None);
|
||||
@@ -157,7 +164,8 @@ public class DeleteUserCommandHandlerTests
|
||||
_identityService,
|
||||
_gateway,
|
||||
_telegramNotifier,
|
||||
_currentUser
|
||||
_currentUser,
|
||||
_logger
|
||||
);
|
||||
|
||||
var result = await handler.Handle(new DeleteUserCommand(userId), CancellationToken.None);
|
||||
|
||||
Reference in New Issue
Block a user