chore: 目录调整,controller转移到外部单独的目录

This commit is contained in:
xiaojunnuo
2024-10-13 21:59:29 +08:00
parent ccfe72a0d9
commit 417971d15d
37 changed files with 79 additions and 81 deletions
@@ -0,0 +1,16 @@
import { MidwayEnvironmentService } from '@midwayjs/core';
import { Controller, Get, Inject, Provide } from '@midwayjs/core';
import { logger } from '@certd/pipeline';
import { Constants } from '@certd/lib-server';
@Provide()
@Controller('/home')
export class HomeController {
@Inject()
environmentService: MidwayEnvironmentService;
@Get('/', { summary: Constants.per.guest })
async home(): Promise<string> {
logger.info('当前环境:', this.environmentService.getCurrentEnvironment()); // prod
return 'Hello Midwayjs!';
}
}