Files
nullcart/backend/src/modules/blog/dto/UpdateBlogPostDto.ts
T
nobswebdev d38def2302 Add blog post admin CRUD API.
Expose JWT-protected /blog-posts endpoints for draft creation, listing, update, and delete.
2026-09-15 20:22:49 +02:00

22 lines
427 B
TypeScript

import { IsBoolean, IsNotEmpty, IsString, MaxLength } from 'class-validator';
import { getAppConfig } from '../../../config';
const {
validation: { blogPostTitleMaxLength }
} = getAppConfig();
export class UpdateBlogPostDto {
@IsNotEmpty()
@IsString()
@MaxLength(blogPostTitleMaxLength)
title: string;
@IsString()
contentHtml: string;
@IsNotEmpty()
@IsBoolean()
isDraft: boolean;
}