返回 AiToEarn
controller.ts
根目录 / project / aitoearn-electron / electron / main / controller.ts
1 /*
2 * @Author: nevin
3 * @Date: 2025-01-20 22:02:54
4 * @LastEditTime: 2025-03-31 11:30:32
5 * @LastEditors: nevin
6 * @Description:
7 */
8 import { Controller, Icp, Inject } from './core/decorators';
9 import { AppService } from './service';
10
11 @Controller()
12 export class AppController {
13 @Inject(AppService)
14 private readonly toolsService!: AppService;
15
16 /**
17 * 获取应用信息
18 */
19 @Icp('ICP_APP_GET_INFO')
20 async getAppInfo(event: Electron.IpcMainInvokeEvent) {
21 return this.toolsService.getAppInfo();
22 }
23 }
24
24 lines TYPESCRIPT