限制提取单次最大量

This commit is contained in:
2025-11-28 18:53:08 +08:00
parent ab8873f2ea
commit 5b6e50de53

View File

@@ -23,6 +23,10 @@ import (
type channelBaiyinService struct{}
func (s *channelBaiyinService) CreateChannels(source netip.Addr, userId int32, resourceId int32, authWhitelist bool, authPassword bool, count int, edgeFilter ...EdgeFilter) ([]*m.Channel, error) {
if count > 400 {
return nil, core.NewBizErr("单次最多提取 400 个")
}
var filter *EdgeFilter = nil
if len(edgeFilter) > 0 {
filter = &edgeFilter[0]