mirror of
https://github.com/alireza0/x-ui.git
synced 2026-08-27 11:52:42 +00:00
[bug] avoid empty inbound #884
This commit is contained in:
parent
b3393e402b
commit
fff74d7ea7
1 changed files with 4 additions and 0 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue