diff --git a/apps/server/src/modules/board/gateway/board-collaboration.gateway.ts b/apps/server/src/modules/board/gateway/board-collaboration.gateway.ts index a647be3ef08..93bffa3cf0e 100644 --- a/apps/server/src/modules/board/gateway/board-collaboration.gateway.ts +++ b/apps/server/src/modules/board/gateway/board-collaboration.gateway.ts @@ -169,7 +169,7 @@ export class BoardCollaborationGateway implements OnGatewayDisconnect { const emitter = await this.buildBoardSocketEmitter({ socket, id: data.columnId, action: 'create-card' }); const { userId } = this.getCurrentUser(socket); try { - const card = await this.columnUc.createCard(userId, data.columnId); + const card = await this.columnUc.createCard(userId, data.columnId, data.requiredEmptyElements); const newCard = CardResponseMapper.mapToResponse(card); const responsePayload = { diff --git a/apps/server/src/modules/board/gateway/dto/create-card.message.param.ts b/apps/server/src/modules/board/gateway/dto/create-card.message.param.ts index aecff720b5a..fc596d8bd2c 100644 --- a/apps/server/src/modules/board/gateway/dto/create-card.message.param.ts +++ b/apps/server/src/modules/board/gateway/dto/create-card.message.param.ts @@ -1,6 +1,17 @@ -import { IsMongoId } from 'class-validator'; +import { ApiPropertyOptional } from '@nestjs/swagger'; +import { IsEnum, IsMongoId, IsOptional } from 'class-validator'; +import { ContentElementType } from '../../domain'; export class CreateCardMessageParams { @IsMongoId() columnId!: string; + + @IsEnum(ContentElementType, { each: true }) + @IsOptional() + @ApiPropertyOptional({ + required: false, + isArray: true, + enum: ContentElementType, + }) + requiredEmptyElements?: ContentElementType[]; }