mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 03:54:55 +00:00
get devices
This commit is contained in:
@ -33,13 +33,13 @@ export class CheckUnitTypeGuard implements CanActivate {
|
||||
}
|
||||
}
|
||||
|
||||
async checkFloorIsFloorType(unitUuid: string) {
|
||||
const unitData = await this.spaceRepository.findOne({
|
||||
where: { uuid: unitUuid },
|
||||
async checkFloorIsFloorType(spaceUuid: string) {
|
||||
const space = await this.spaceRepository.findOne({
|
||||
where: { uuid: spaceUuid },
|
||||
});
|
||||
|
||||
if (!unitData) {
|
||||
throw new BadRequestException('Invalid unit UUID');
|
||||
if (!space) {
|
||||
throw new BadRequestException(`Invalid space UUID ${spaceUuid}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user