fixed the publishedAt
This commit is contained in:
@@ -44,5 +44,5 @@ export class CreateBlogDto {
|
||||
@ApiPropertyOptional({ description: 'Publication date' })
|
||||
@IsDateString()
|
||||
@IsOptional()
|
||||
publishedAt?: Date;
|
||||
publishedAt?: string;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ export class BlogsService {
|
||||
data: {
|
||||
...createBlogDto,
|
||||
tags: createBlogDto.tags || [],
|
||||
publishedAt: createBlogDto.publishedAt ? new Date(createBlogDto.publishedAt) : null
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user