import { Controller , Get , Query , ParseIntPipe } from '@nestjs/common' ; import { AlbumService } from '../service/album.service' ; import { UN_SECRET_STATUS } from '../../article/constance' ; @ Controller ( 'album/visitor' ) export class VisitorController { constructor ( private readonly service ) { } @ Get ( '/list' ) async getList ( @ Query ( 'page' , new ParseIntPipe ( ) ) page = 1 , @ Query ( 'size' , new ParseIntPipe ( ) ) size = 10 , @ Query ( 'user_id' , new ParseIntPipe ( ) ) userId ) { const needRelations = true ; const secret = UN_SECRET_STATUS ; return this . service . getList ( page , size , userId , secret , needRelations ) ; } }