mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-26 20:44:53 +00:00
remove unused guard
This commit is contained in:
@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user