mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-24 08:17:54 +00:00
disabling space
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user