import { Controller , Get , Param } from '@nestjs/common' ; import { ApiDetailService } from './detail.service' ; @ Controller ( '/api' ) export class ApiController { constructor ( private readonly apiDetailService ) { } @ Get ( '/detail/:id' ) async getDetailData ( @ Param ( ) params ) { const data = await this . apiDetailService . index ( params . id ) ; return data ; } }