mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-10 15:17:41 +00:00
fixed query commit
This commit is contained in:
@ -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(
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user