mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-07-15 18:27:05 +00:00
Merge pull request #228 from SyncrowIOT/bugfix/create-subspace
fix create subspace
This commit is contained in:
@ -1,5 +1,11 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiProperty } from '@nestjs/swagger';
|
||||||
import { IsArray, IsNotEmpty, IsString, ValidateNested } from 'class-validator';
|
import {
|
||||||
|
IsArray,
|
||||||
|
IsNotEmpty,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
ValidateNested,
|
||||||
|
} from 'class-validator';
|
||||||
import { CreateTagDto } from '../tag';
|
import { CreateTagDto } from '../tag';
|
||||||
import { Type } from 'class-transformer';
|
import { Type } from 'class-transformer';
|
||||||
|
|
||||||
@ -19,5 +25,6 @@ export class AddSubspaceDto {
|
|||||||
@IsArray()
|
@IsArray()
|
||||||
@ValidateNested({ each: true })
|
@ValidateNested({ each: true })
|
||||||
@Type(() => CreateTagDto)
|
@Type(() => CreateTagDto)
|
||||||
|
@IsOptional()
|
||||||
tags?: CreateTagDto[];
|
tags?: CreateTagDto[];
|
||||||
}
|
}
|
||||||
|
@ -146,7 +146,7 @@ export class SubSpaceService {
|
|||||||
): Promise<BaseResponseDto> {
|
): Promise<BaseResponseDto> {
|
||||||
const space =
|
const space =
|
||||||
await this.validationService.validateSpaceWithinCommunityAndProject(
|
await this.validationService.validateSpaceWithinCommunityAndProject(
|
||||||
params.projectUuid,
|
params.communityUuid,
|
||||||
params.projectUuid,
|
params.projectUuid,
|
||||||
params.spaceUuid,
|
params.spaceUuid,
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user