remove unused guard

This commit is contained in:
hannathkadher
2024-10-30 11:28:25 +04:00
parent a486b24ef8
commit 2422f40a2d
12 changed files with 3 additions and 524 deletions

View File

@ -9,7 +9,6 @@ export class SpacePermissionService {
async checkUserPermission(
spaceUuid: string,
userUuid: string,
type: string,
): Promise<void> {
try {
const spaceData = await this.spaceRepository.findOne({
@ -21,12 +20,12 @@ export class SpacePermissionService {
},
},
},
relations: ['spaceType', 'userSpaces', 'userSpaces.user'],
relations: ['userSpaces', 'userSpaces.user'],
});
if (!spaceData) {
throw new BadRequestException(
`You do not have permission to access this ${type}`,
`You do not have permission to access this space`,
);
}
} catch (err) {