mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-19 23:35:48 +00:00
Fix add client #26
This commit is contained in:
@@ -351,10 +351,11 @@
|
||||
await this.submit(`/xui/inbound/update/${dbInbound.id}`, data, inModal);
|
||||
},
|
||||
openAddClient(inbound) {
|
||||
dbInbound = this.dbInbounds.find(row => row.id === inbound.id);
|
||||
clientModal.show({
|
||||
title: '{{ i18n "pages.client.add"}}',
|
||||
okText: '{{ i18n "pages.client.submitAdd"}}',
|
||||
dbInbound: inbound,
|
||||
dbInbound: dbInbound,
|
||||
confirm: async (inbound, dbInbound, index) => {
|
||||
clientModal.loading();
|
||||
await this.addClient(inbound, dbInbound);
|
||||
|
||||
@@ -134,7 +134,9 @@ func (s *InboundService) AddInbound(inbound *model.Inbound) (*model.Inbound, err
|
||||
|
||||
err = db.Save(inbound).Error
|
||||
if err == nil {
|
||||
s.AddClientStat(inbound.Id, &clients[0])
|
||||
for _, client := range clients {
|
||||
s.AddClientStat(inbound.Id, &client)
|
||||
}
|
||||
}
|
||||
return inbound, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user