import { Controller , Get } from '@nestjs/common' ; import { ApiService } from './index.service' ; @ Controller ( '/api' ) export class ApiController { constructor ( private readonly apiService ) { } @ Get ( '/index' ) async getIndexData ( ) { return await this . apiService . index ( ) ; } }