[bug] avoid empty inbound #884

This commit is contained in:
Alireza Ahmadi
2024-01-23 22:01:57 +01:00
parent b3393e402b
commit fff74d7ea7

View File

@@ -474,6 +474,10 @@ func (s *InboundService) DelInboundClient(inboundId int, clientId string) (bool,
}
}
if len(newClients) == 0 {
return false, common.NewError("no client remained in Inbound")
}
settings["clients"] = newClients
newSettings, err := json.MarshalIndent(settings, "", " ")
if err != nil {