diff --git a/backend/src/modules/articles.dto.ts b/backend/src/modules/articles.dto.ts index 639a4ff..4db4fce 100644 --- a/backend/src/modules/articles.dto.ts +++ b/backend/src/modules/articles.dto.ts @@ -6,6 +6,7 @@ import { IsUUID, IsNumber, IsBoolean, + IsDateString, } from 'class-validator'; import { ArticleStatus, @@ -371,6 +372,18 @@ export class CreateLiveBlogUpdateDto { @IsString() content: string; + @IsOptional() + @IsBoolean() + isPinned?: boolean; + + @IsOptional() + @IsString() + authorId?: string; + + @IsOptional() + @IsDateString() + scheduledAt?: string; + @IsOptional() @IsString() image?: string; @@ -389,6 +402,14 @@ export class UpdateLiveBlogUpdateDto { @IsString() content?: string; + @IsOptional() + @IsBoolean() + isPinned?: boolean; + + @IsOptional() + @IsString() + authorId?: string; + @IsOptional() @IsString() image?: string; @@ -400,8 +421,4 @@ export class UpdateLiveBlogUpdateDto { @IsOptional() @IsString() authorName?: string; - - @IsOptional() - @IsBoolean() - isPinned?: boolean; } diff --git a/frontend/src/components/home/PinnedLiveBlogsSidebar.tsx b/frontend/src/components/home/PinnedLiveBlogsSidebar.tsx index bfd8383..bd6f74d 100644 --- a/frontend/src/components/home/PinnedLiveBlogsSidebar.tsx +++ b/frontend/src/components/home/PinnedLiveBlogsSidebar.tsx @@ -116,7 +116,8 @@ export function PinnedLiveBlogsSidebar() { {liveBlogs.map((liveBlog) => (
diff --git a/frontend/src/components/routes/LiveBlogsComponent.tsx b/frontend/src/components/routes/LiveBlogsComponent.tsx index 9845194..c32dc17 100644 --- a/frontend/src/components/routes/LiveBlogsComponent.tsx +++ b/frontend/src/components/routes/LiveBlogsComponent.tsx @@ -37,10 +37,11 @@ export function LiveBlogsComponent() {
{data?.data.map((liveBlog) => ( + key={liveBlog.id} + to="/live-blogs/$slug" + params={{ slug: liveBlog.slug }} + className="p-6 rounded-xl border bg-card hover:shadow-lg transition-shadow cursor-pointer block" + >