fixed delete space

This commit is contained in:
hannathkadher
2025-01-06 13:42:08 +04:00
parent c0c876c491
commit d719ad60f4
4 changed files with 26 additions and 21 deletions
+3 -2
View File
@@ -152,9 +152,10 @@ export class UserSpaceService {
async deleteUserSpace(spaceUuid: string) {
try {
await this.userSpaceRepository
.createQueryBuilder()
.createQueryBuilder('userSpace')
.leftJoin('userSpace.space', 'space')
.delete()
.where('spaceUuid = :spaceUuid', { spaceUuid })
.where('space.uuid = :spaceUuid', { spaceUuid })
.execute();
} catch (error) {
console.error(`Error deleting user-space associations: ${error.message}`);