feat: Phase 1-3 全部完成 — 沙盒增强、学情分析、学习路径
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { Controller, Get, Post, Body, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { ToolsService } from './tools.service';
|
||||
|
||||
@ApiTags('AI工具')
|
||||
@Controller('tools')
|
||||
export class ToolsController {
|
||||
constructor(private toolsService: ToolsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Query() query: { page?: number; pageSize?: number; categoryId?: number; isFeatured?: boolean }) {
|
||||
return this.toolsService.findAll(query);
|
||||
}
|
||||
|
||||
@Post()
|
||||
async create(@Body() body: { name: string; description?: string; url: string; icon?: string; categoryId?: number; tags?: string }) {
|
||||
return this.toolsService.create(body);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user