优化通道关闭流程,只靠 batch id 索引通道

This commit is contained in:
2025-12-05 18:31:30 +08:00
parent 4a2dcabf58
commit 5649a03c47
6 changed files with 37 additions and 53 deletions

View File

@@ -162,8 +162,7 @@ type CreateChannelResultType string
// region RemoveChannels
type RemoveChannelsReq struct {
Batch string `json:"batch" validate:"required"`
Ids []int32 `json:"ids" validate:"required"`
Batch string `json:"batch" validate:"required"`
}
func RemoveChannels(c *fiber.Ctx) error {
@@ -180,7 +179,7 @@ func RemoveChannels(c *fiber.Ctx) error {
}
// 删除通道
err = s.Channel.RemoveChannels(req.Batch, req.Ids)
err = s.Channel.RemoveChannels(req.Batch)
if err != nil {
return err
}