fix: harden real backend admin workflows and ui
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user