import { Controller, Get, Inject } from '@midwayjs/core'; import { UtilService } from '../service/util.service'; @Controller('/') export class HomeController { @Inject() service: UtilService; @Get('/') async home(): Promise { // const result: any = await this.adminService.create(); // await this.service.initData(); return 'starting...'; } // @Get('/:method') // async test(@Param('method') method: string, @Query() query: object) { // const result: any = await this.adminService[method](query); // return result; // } }