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:
@@ -1,5 +1,6 @@
|
||||
using PnvPanel.Application.Common.Interfaces;
|
||||
using PnvPanel.Application.Common.Messaging;
|
||||
using PnvPanel.Application.Common.Models;
|
||||
|
||||
namespace PnvPanel.Application.Common.Behaviors;
|
||||
|
||||
@@ -19,7 +20,12 @@ public sealed class UnitOfWorkBehavior<TRequest, TResponse>(IAppDbContext dbCont
|
||||
)
|
||||
{
|
||||
var response = await next();
|
||||
await dbContext.SaveChangesAsync(cancellationToken);
|
||||
|
||||
// Не коммитим мутации, сделанные до отказа хендлера (например Approve() до фейла
|
||||
// последующего шага) — иначе в БД закрепляется частичное/противоречивое состояние.
|
||||
if (response is not Result { IsSuccess: false })
|
||||
await dbContext.SaveChangesAsync(cancellationToken);
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user