docs & cleanup: update stack info, remove dead code, fix backend bugs
- Fix AGENTS.md and 技术架构设计.md to reflect actual stack (Prisma+MySQL, static export, PM2) - Remove 4 unused frontend components (page-transition, page-layout, image-upload, section-card) - Fix card.tsx hardcoded colors → CSS variables - Remove provider name from model selector, remove sensenova-u1-fast from models - Fix analytics.controller.ts raw SQL table names (runtime bug) - Add JWT auth guard to tools POST endpoint - Fix AI gateway test: update env vars and model names - Fix admin test: mock role structure for Prisma relation
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Controller, Get, Post, Body, Query } from '@nestjs/common';
|
||||
import { ApiTags } from '@nestjs/swagger';
|
||||
import { Controller, Get, Post, Body, Query, UseGuards } from '@nestjs/common';
|
||||
import { ApiTags, ApiBearerAuth } from '@nestjs/swagger';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import { ToolsService } from './tools.service';
|
||||
|
||||
@ApiTags('AI工具')
|
||||
@@ -13,6 +14,8 @@ export class ToolsController {
|
||||
}
|
||||
|
||||
@Post()
|
||||
@UseGuards(AuthGuard('jwt'))
|
||||
@ApiBearerAuth()
|
||||
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