Add blog post admin CRUD API.

Expose JWT-protected /blog-posts endpoints for draft creation, listing, update, and delete.
This commit is contained in:
2026-09-15 20:22:49 +02:00
parent 92ccbec545
commit d38def2302
7 changed files with 295 additions and 0 deletions
@@ -0,0 +1,21 @@
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;
}