mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 14:54:54 +00:00
Enforced service accessing space and automation within the project
This commit is contained in:
12
libs/common/src/dto/community-space.param.ts
Normal file
12
libs/common/src/dto/community-space.param.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { ProjectParam } from './project-param.dto';
|
||||
import { IsUUID } from 'class-validator';
|
||||
|
||||
export class CommunityParam extends ProjectParam {
|
||||
@ApiProperty({
|
||||
description: 'UUID of the community this space belongs to',
|
||||
example: 'd290f1ee-6c54-4b01-90e6-d701748f0851',
|
||||
})
|
||||
@IsUUID()
|
||||
communityUuid: string;
|
||||
}
|
||||
12
libs/common/src/dto/get.space.param.ts
Normal file
12
libs/common/src/dto/get.space.param.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsUUID } from 'class-validator';
|
||||
import { CommunityParam } from './community-space.param';
|
||||
|
||||
export class GetSpaceParam extends CommunityParam {
|
||||
@ApiProperty({
|
||||
description: 'UUID of the Space',
|
||||
example: 'd290f1ee-6c54-4b01-90e6-d701748f0851',
|
||||
})
|
||||
@IsUUID()
|
||||
spaceUuid: string;
|
||||
}
|
||||
Reference in New Issue
Block a user