修复迁移后错误

This commit is contained in:
万物街
2025-09-11 22:06:19 +08:00
parent 7a20a0c50a
commit 6a3b302e69
193 changed files with 11792 additions and 1268 deletions

View File

@@ -0,0 +1,66 @@
import {
Controller,
Get,
Post,
Body,
Param,
Query,
UseGuards,
} from '@nestjs/common';
import { JwtAuthGuard } from '../../../auth/guards/JwtAuthGuard';
import { AddonApiService } from '../../services/api/AddonApiService';
@Controller('api/addon')
@UseGuards(JwtAuthGuard)
export class AddonApiController {
constructor(private readonly addonApiService: AddonApiService) {}
/**
* 获取插件列表
*/
@Get('lists')
async lists(@Query() query: any) {
return this.addonApiService.getPage(query);
}
/**
* 获取插件信息
*/
@Get('info/:addon_id')
async info(@Param('addon_id') addon_id: string) {
return this.addonApiService.getInfo(parseInt(addon_id));
}
/**
* 获取可用插件
*/
@Get('available')
async getAvailable(@Query() query: any) {
return this.addonApiService.getAvailable(query);
}
/**
* 获取插件配置
*/
@Get('config/:addon_id')
async getConfig(@Param('addon_id') addon_id: string) {
return this.addonApiService.getConfig(parseInt(addon_id));
}
/**
* 获取插件状态
*/
@Get('status/:addon_id')
async getStatus(@Param('addon_id') addon_id: string) {
return this.addonApiService.getStatus(parseInt(addon_id));
}
/**
* 获取插件统计
*/
@Get('statistics/:addon_id')
async getStatistics(@Param('addon_id') addon_id: string) {
return this.addonApiService.getStatistics(parseInt(addon_id));
}
}