All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 44s
H0-01: Reject Apple login mock fallback in production H0-02: Protect /internal/* with InternalAuthGuard (X-Internal-API-Key) H0-03: JwtAuthGuard check user status (deletedAt, status) H0-04: Refresh token check user status + revoke all on deleted H0-05: User/admin JWT isolation (type=user/admin, enforce ADMIN_JWT_ACCESS_SECRET) H0-06: Add DTOs for import/source/learning-session controllers H0-07: 22 E2E tests (h0.e2e-spec.ts), 5 iOS integration docs Tests: 47/47 (H0 22 + M0 25), no regression. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
24 lines
789 B
TypeScript
24 lines
789 B
TypeScript
import { Controller, Get, Post, Param, HttpCode, HttpStatus, Body } from '@nestjs/common';
|
|
import { ApiTags, ApiOperation } from '@nestjs/swagger';
|
|
import { DocumentImportService } from './document-import.service';
|
|
import { CreateImportDto } from './dto/create-import.dto';
|
|
|
|
@ApiTags('document-import')
|
|
@Controller('imports')
|
|
export class DocumentImportController {
|
|
constructor(private readonly service: DocumentImportService) {}
|
|
|
|
@Post()
|
|
@HttpCode(HttpStatus.CREATED)
|
|
@ApiOperation({ summary: '创建导入任务' })
|
|
async createImport(@Body() dto: CreateImportDto) {
|
|
return this.service.createImport(dto);
|
|
}
|
|
|
|
@Get(':id/status')
|
|
@ApiOperation({ summary: '查询导入状态' })
|
|
async getStatus(@Param('id') id: string) {
|
|
return this.service.getStatus(id);
|
|
}
|
|
}
|