home.controller.ts 567 B

12345678910111213141516171819
  1. import { Controller, Get, Inject } from '@midwayjs/core';
  2. import { UtilService } from '../service/util.service';
  3. @Controller('/')
  4. export class HomeController {
  5. @Inject()
  6. service: UtilService;
  7. @Get('/')
  8. async home(): Promise<string> {
  9. // const result: any = await this.adminService.create();
  10. // await this.service.initData();
  11. return 'starting...';
  12. }
  13. // @Get('/:method')
  14. // async test(@Param('method') method: string, @Query() query: object) {
  15. // const result: any = await this.adminService[method](query);
  16. // return result;
  17. // }
  18. }