import { Controller , Get , Post , Body , Query , Next , Headers , UseGuards , ParseIntPipe , } from '@nestjs/common' ; import { CategoryService } from '../service/category.service' ; import { UserGuard } from '../../../common/guards/user.guard' ; @ Controller ( 'category/visitor' ) export class UserController { constructor ( private readonly categoryService ) { } @ UseGuards ( UserGuard ) @ Get ( '/list' ) async getList ( @ Query ( 'page' , new ParseIntPipe ( ) ) page , @ Query ( 'size' , new ParseIntPipe ( ) ) size , @ Query ( 'user_id' , new ParseIntPipe ( ) ) userId ) { return this . categoryService . getList ( page , size , userId ) ; } }