fix: harden real backend admin workflows and ui

This commit is contained in:
hectorzhao
2026-07-03 19:29:56 +08:00
parent dd09d91c1e
commit 8cca361441
71 changed files with 5111 additions and 4439 deletions
+13 -1
View File
@@ -1,4 +1,4 @@
import { Body, Controller, Delete, Get, Param, Post, Query } from '@nestjs/common';
import { Body, Controller, Delete, Get, Param, Post, Put, Query } from '@nestjs/common';
import { ApiTags } from '@nestjs/swagger';
import {
ChannelsService,
@@ -14,6 +14,8 @@ import {
CreateReportTaskDto,
CreateRouteRuleDto,
UpsertConnectionStateDto,
UpdateChannelDto,
UpdateChannelGroupDto,
} from './channels.service';
@ApiTags('channels')
@@ -31,6 +33,11 @@ export class ChannelsController {
return this.channels.createChannel(body);
}
@Put('channels/:id')
updateChannel(@Param('id') channelId: string, @Body() body: UpdateChannelDto) {
return this.channels.updateChannel(channelId, body);
}
@Post('channels/:id/test')
testChannel(@Param('id') channelId: string) {
return this.channels.testChannel(channelId);
@@ -86,6 +93,11 @@ export class ChannelsController {
return this.channels.createGroup(body);
}
@Put('channel-groups/:id')
updateGroup(@Param('id') groupId: string, @Body() body: UpdateChannelGroupDto) {
return this.channels.updateGroup(groupId, body);
}
@Post('channel-groups/items')
addGroupItem(@Body() body: CreateChannelGroupItemDto) {
return this.channels.addGroupItem(body);