feat: resolve doctors query error, add FAQ, testimonials, blog preview, and full menu management
Deploy Canina / deploy (push) Successful in 1m41s

This commit is contained in:
parsa aghaei committed 2026-08-19 17:20:01 +03:30
1 parent 70d58e7086
commit 2c452215c3
31 files changed
+1987 -76

No files matched your search

+43 -4
View File
@@ -3,6 +3,7 @@ import {
Get,
Post,
Put,
Patch,
Delete,
Body,
Param,
@@ -19,7 +20,6 @@ import {
ApiOperation,
ApiQuery,
} from '@nestjs/swagger';
import { PaginationDto } from '../common/dto/pagination.dto';
@ApiTags('Admin - مدیریت مقالات (بلاگ)')
@@ -31,9 +31,9 @@ export class BlogsController {
@Get()
@ApiOperation({ summary: 'لیست مقالات' })
@ApiQuery({ name: 'page', required: false, description: 'شماره صفحه' })
@ApiQuery({ name: 'limit', required: false, description: 'تعداد آیتم‌ها' })
@ApiQuery({ name: 'search', required: false, description: 'جستجو' })
@ApiQuery({ name: 'page', required: false })
@ApiQuery({ name: 'limit', required: false })
@ApiQuery({ name: 'search', required: false })
async getBlogs(@Query() query: PaginationDto) {
return this.blogsService.getBlogs(query);
}
@@ -64,4 +64,43 @@ export class BlogsController {
await this.blogsService.deleteBlog(id);
return { success: true };
}
// Blog Comments endpoints
@Get('comments')
@ApiOperation({ summary: 'لیست نظرات مقالات' })
@ApiQuery({
name: 'status',
required: false,
description: 'PENDING | APPROVED | REJECTED',
})
@ApiQuery({ name: 'blogId', required: false })
@ApiQuery({ name: 'page', required: false })
@ApiQuery({ name: 'limit', required: false })
async getComments(
@Query()
query: {
page?: number;
limit?: number;
status?: string;
blogId?: string;
},
) {
return this.blogsService.getComments(query);
}
@Patch('comments/:id/status')
@ApiOperation({ summary: 'تغییر وضعیت نظر (تأیید/رد)' })
async updateCommentStatus(
@Param('id') id: string,
@Body() body: { status: 'APPROVED' | 'REJECTED' },
) {
return this.blogsService.updateCommentStatus(id, body.status);
}
@Delete('comments/:id')
@ApiOperation({ summary: 'حذف نظر' })
async deleteComment(@Param('id') id: string) {
await this.blogsService.deleteComment(id);
return { success: true };
}
}