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:
parent
46022d871f
commit
b6ccaa696a
1 changed files with 4 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue