| 12345678910111213141516171819202122232425262728293031 |
- import {
- Controller,
- Put,
- Get,
- Body,
- Param,
- HttpStatus,
- NotFoundException,
- Delete,
- BadRequestException,
- Req,
- Post
- } from '@nestjs/common'
- import { ApiBearerAuth, ApiTags } from '@nestjs/swagger'
- import { CommentService } from './comment.service'
- import { Comment } from './entities/comment.entity'
- import { PageRequest } from 'src/common/dto/page-request'
- @ApiTags('comment')
- @Controller('/comment')
- @ApiBearerAuth()
- export class CommentController {
- constructor(private readonly commentService: CommentService) { }
- @Post('/:id')
- public async list(@Body() page: PageRequest<Comment>, @Param('id') id: number) {
- return await this.commentService.findAll(page,id)
- }
- }
|