From 0d9f4aebcd044f92fd1b4610f38ffc8a97c7ce8c Mon Sep 17 00:00:00 2001 From: Uwe Ilgenstein Date: Tue, 11 Jun 2024 15:50:23 +0200 Subject: [PATCH] fix optional column title --- .../src/modules/board/controller/dto/board/column.response.ts | 4 ++-- .../modules/board/controller/mapper/column-response.mapper.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/server/src/modules/board/controller/dto/board/column.response.ts b/apps/server/src/modules/board/controller/dto/board/column.response.ts index 9ef7bef7db0..56938cc62aa 100644 --- a/apps/server/src/modules/board/controller/dto/board/column.response.ts +++ b/apps/server/src/modules/board/controller/dto/board/column.response.ts @@ -1,7 +1,7 @@ import { ApiProperty } from '@nestjs/swagger'; import { DecodeHtmlEntities } from '@shared/controller'; -import { CardSkeletonResponse } from './card-skeleton.response'; import { TimestampsResponse } from '../timestamps.response'; +import { CardSkeletonResponse } from './card-skeleton.response'; export class ColumnResponse { constructor({ id, title, cards, timestamps }: ColumnResponse) { @@ -18,7 +18,7 @@ export class ColumnResponse { @ApiProperty() @DecodeHtmlEntities() - title?: string; + title: string; @ApiProperty({ type: [CardSkeletonResponse], diff --git a/apps/server/src/modules/board/controller/mapper/column-response.mapper.ts b/apps/server/src/modules/board/controller/mapper/column-response.mapper.ts index 392208df7ee..adf831e785d 100644 --- a/apps/server/src/modules/board/controller/mapper/column-response.mapper.ts +++ b/apps/server/src/modules/board/controller/mapper/column-response.mapper.ts @@ -6,7 +6,7 @@ export class ColumnResponseMapper { static mapToResponse(column: Column): ColumnResponse { const result = new ColumnResponse({ id: column.id, - title: column.title, + title: column.title ?? '', cards: column.children.map((card) => { /* istanbul ignore next */ if (!(card instanceof Card)) {