fix: align channel copy and gateway connection state
This commit is contained in:
@@ -569,7 +569,7 @@ describe('ChannelsService', () => {
|
||||
|
||||
const copied = await service.copyChannel('channel-1', { operatorId: 'admin-1' });
|
||||
|
||||
expect(copied).toEqual(expect.objectContaining({ id: 'channel-copy', name: '主通道副本' }));
|
||||
expect(copied).toEqual(expect.objectContaining({ id: 'channel-copy', name: '主通道副本', status: 'disabled' }));
|
||||
expect(prisma.$transaction).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
|
||||
@@ -356,7 +356,7 @@ export class ChannelsService implements OnModuleInit, OnModuleDestroy {
|
||||
cmppVersion: source.cmppVersion,
|
||||
rateLimitPerSecond: source.rateLimitPerSecond,
|
||||
unitPrice: source.unitPrice,
|
||||
status: source.status,
|
||||
status: 'disabled',
|
||||
config: source.config as Prisma.InputJsonValue | undefined,
|
||||
reportFields: {
|
||||
create: source.reportFields.map((field) => ({
|
||||
@@ -396,6 +396,8 @@ export class ChannelsService implements OnModuleInit, OnModuleDestroy {
|
||||
detail: {
|
||||
sourceChannelId: source.id,
|
||||
sourceCode: source.code,
|
||||
sourceStatus: source.status,
|
||||
copiedStatus: 'disabled',
|
||||
copiedReportFields: source.reportFields.length,
|
||||
copiedReportMaterials: reportMaterials.length,
|
||||
} as Prisma.InputJsonValue,
|
||||
|
||||
Reference in New Issue
Block a user