feat: complete backend swagger annotations, admin pages pagination, and frontend application fixes
This commit is contained in:
1 parent
24137beb32
commit
2851ef8a25
41 files changed
+478
-128
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { Controller, Get, Param, HttpStatus } from '@nestjs/common';
|
||||
import { Controller, Get, Param, HttpStatus, Query } from '@nestjs/common';
|
||||
import { BlogsService } from './blogs.service';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiOkResponse, ApiNotFoundResponse } from '@nestjs/swagger';
|
||||
import { ApiTags, ApiOperation, ApiResponse, ApiOkResponse, ApiNotFoundResponse, ApiQuery } from '@nestjs/swagger';
|
||||
import { PaginationDto } from '../common/dto/pagination.dto';
|
||||
|
||||
@ApiTags('Blogs - مجله سلامت')
|
||||
@Controller('blogs')
|
||||
@@ -13,9 +14,9 @@ export class BlogsController {
|
||||
|
||||
@Get()
|
||||
@ApiOperation({ summary: 'دریافت لیست مقالات مجله سلامت' })
|
||||
@ApiOkResponse({ description: 'لیست مقالات منتشر شده' })
|
||||
findAll() {
|
||||
return this.blogsService.findAll();
|
||||
@ApiOkResponse({ description: 'لیست مقالات منتشر شده (صفحهبندی شده)' })
|
||||
findAll(@Query() query: PaginationDto) {
|
||||
return this.blogsService.findAll(query);
|
||||
}
|
||||
|
||||
@Get(':slug')
|
||||
|
||||
Reference in new issue
Block a user