get devices

This commit is contained in:
hannathkadher
2024-10-30 19:07:26 +04:00
parent 295013fd15
commit adacc60a40
15 changed files with 306 additions and 69 deletions

View File

@ -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}`);
}
}