返回 AiToEarn
qa.controller.ts
根目录 / project / aitoearn-electron / server / src / modules / other / qa.controller.ts
1 /*
2 * @Author: nevin
3 * @Date: 2024-06-17 19:19:20
4 * @LastEditTime: 2025-04-14 19:21:01
5 * @LastEditors: nevin
6 * @Description: QA
7 */
8 import { Controller, Get, Param, Query } from '@nestjs/common';
9 import { ApiOperation, ApiTags } from '@nestjs/swagger';
10 import { ParamsValidationPipe } from 'src/validation.pipe';
11 import { TokenInfo } from 'src/auth/interfaces/auth.interfaces';
12 import { GetToken } from 'src/auth/auth.guard';
13 import { TableDto } from 'src/global/dto/table.dto';
14 import { QaService } from './qa.service';
15
16 @ApiTags('QA')
17 @Controller('qa')
18 export class QaController {
19 constructor(private readonly qaService: QaService) {}
20
21 @ApiOperation({
22 description: '获取列表',
23 summary: '获取列表',
24 })
25 @Get('list/:pageNo/:pageSize')
26 async getPubRecordDraftsList(
27 @GetToken() token: TokenInfo,
28 @Param(new ParamsValidationPipe()) param: TableDto,
29 @Query(new ParamsValidationPipe()) query: any,
30 ) {
31 const res = await this.qaService.getQaRecordList(param, query);
32 return res;
33 }
34 }
35
35 lines TYPESCRIPT