disabling space

This commit is contained in:
hannathkadher
2024-12-25 16:23:09 +04:00
parent f9fe209076
commit f7b75a630a
12 changed files with 198 additions and 27 deletions
+16
View File
@@ -150,4 +150,20 @@ export class UserSpaceService {
await Promise.all(permissionPromises);
}
async deleteUserSpace(spaceUuid: string) {
try {
await this.userSpaceRepository
.createQueryBuilder()
.delete()
.where('spaceUuid = :spaceUuid', { spaceUuid })
.execute();
} catch (error) {
console.error(`Error deleting user-space associations: ${error.message}`);
throw new HttpException(
`Failed to delete user-space associations: ${error.message}`,
HttpStatus.INTERNAL_SERVER_ERROR,
);
}
}
}