mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-24 16:57:54 +00:00
Fixed user space permission
This commit is contained in:
@@ -111,6 +111,7 @@ export class SpaceController {
|
||||
return this.spaceService.getSpacesHierarchyForSpace(params.spaceUuid);
|
||||
}
|
||||
|
||||
//should it be post?
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@ApiOperation({
|
||||
@@ -118,7 +119,7 @@ export class SpaceController {
|
||||
description:
|
||||
ControllerRoute.SPACE.ACTIONS.CREATE_INVITATION_CODE_SPACE_DESCRIPTION,
|
||||
})
|
||||
@Post(':spaceUuid/invitation-code')
|
||||
@Get(':spaceUuid/invitation-code')
|
||||
async generateSpaceInvitationCode(
|
||||
@Param() params: GetSpaceParam,
|
||||
): Promise<BaseResponseDto> {
|
||||
|
||||
@@ -33,3 +33,43 @@ export class AddSpaceDto {
|
||||
@IsBoolean()
|
||||
isPrivate: boolean;
|
||||
}
|
||||
|
||||
export class AddUserSpaceDto {
|
||||
@ApiProperty({
|
||||
description: 'spaceUuid',
|
||||
required: true,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public spaceUuid: string;
|
||||
@ApiProperty({
|
||||
description: 'userUuid',
|
||||
required: true,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public userUuid: string;
|
||||
constructor(dto: Partial<AddUserSpaceDto>) {
|
||||
Object.assign(this, dto);
|
||||
}
|
||||
}
|
||||
|
||||
export class AddUserSpaceUsingCodeDto {
|
||||
@ApiProperty({
|
||||
description: 'userUuid',
|
||||
required: true,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public userUuid: string;
|
||||
@ApiProperty({
|
||||
description: 'inviteCode',
|
||||
required: true,
|
||||
})
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
public inviteCode: string;
|
||||
constructor(dto: Partial<AddUserSpaceDto>) {
|
||||
Object.assign(this, dto);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user