fixed query commit

This commit is contained in:
hannathkadher
2025-02-26 16:02:58 +04:00
parent f98c3cd4ad
commit 2a5b35a297
2 changed files with 2 additions and 3 deletions

View File

@ -22,7 +22,6 @@ export class PropogateDeleteSpaceModelHandler
const { spaceModel, queryRunner } = command.param;
try {
await queryRunner.connect();
await queryRunner.startTransaction();
const spaces = await this.spaceRepository.find({
where: {
@ -43,6 +42,7 @@ export class PropogateDeleteSpaceModelHandler
);
}
}
await queryRunner.commitTransaction();
} catch (error) {
await queryRunner.rollbackTransaction();
this.logger.error(

View File

@ -295,6 +295,7 @@ export class SpaceModelService {
{ uuid: param.spaceModelUuid },
{ disabled: true },
);
await queryRunner.commitTransaction();
await this.commandBus.execute(
new PropogateDeleteSpaceModelCommand({
@ -303,8 +304,6 @@ export class SpaceModelService {
}),
);
await queryRunner.commitTransaction();
return new SuccessResponseDto({
message: `SpaceModel with UUID ${param.spaceModelUuid} deleted successfully.`,
statusCode: HttpStatus.OK,