fixed the publishedAt

This commit is contained in:
2025-10-27 13:17:51 +05:30
parent 383c32db7c
commit 880e3dc896
2 changed files with 2 additions and 1 deletions

View File

@@ -44,5 +44,5 @@ export class CreateBlogDto {
@ApiPropertyOptional({ description: 'Publication date' })
@IsDateString()
@IsOptional()
publishedAt?: Date;
publishedAt?: string;
}

View File

@@ -15,6 +15,7 @@ export class BlogsService {
data: {
...createBlogDto,
tags: createBlogDto.tags || [],
publishedAt: createBlogDto.publishedAt ? new Date(createBlogDto.publishedAt) : null
},
});