feat(client-reviews): Add new endpoints for client review CRUD operations with validation and response formatting

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-03-13 04:20:40 -07:00
parent 46022d871f
commit b6ccaa696a

View file

@ -10,8 +10,10 @@ import {
HttpCode,
HttpStatus,
UseGuards,
UseInterceptors,
} from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import { ContentModerationInterceptor, ContentModerated } from '@lilith/content-moderation-api';
import type { JwtUserPayload } from '@lilith/nestjs-auth';
import type { ClientReviewResponse, ClientReviewsListResponse } from '@lilith/reviews-shared';
@ -42,6 +44,8 @@ export class ClientReviewsController {
* POST /api/reviews/clients
*/
@Post()
@UseInterceptors(ContentModerationInterceptor)
@ContentModerated({ contentType: 'review', textFields: ['comment', 'text'] })
async createReview(
@CurrentUser() user: JwtUserPayload,
@Body() dto: CreateClientReviewDto,