[feature] import-export inbound #699

This commit is contained in:
Alireza Ahmadi
2023-12-07 12:58:19 +01:00
parent ff59bb60ce
commit fd64ae5c85
9 changed files with 89 additions and 5 deletions

View File

@@ -168,9 +168,13 @@ func (s *InboundService) AddInbound(inbound *model.Inbound) (*model.Inbound, boo
err = tx.Save(inbound).Error
if err == nil {
for _, client := range clients {
s.AddClientStat(tx, inbound.Id, &client)
if len(inbound.ClientStats) == 0 {
for _, client := range clients {
s.AddClientStat(tx, inbound.Id, &client)
}
}
} else {
return inbound, false, err
}
needRestart := false