mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
Small fixes
This commit is contained in:
@@ -154,8 +154,6 @@ func (a *InboundController) delInboundClient(c *gin.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
logger.Error("email: " + email + " ID: " + strconv.Itoa(inbound.Id) + " Settings: " + inbound.Settings)
|
||||
|
||||
err = a.inboundService.DelInboundClient(inbound, email)
|
||||
if err != nil {
|
||||
jsonMsg(c, "something worng!", err)
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
isTrafficExhausted(dbInbound, email) {
|
||||
if(email.length == 0) return false
|
||||
clientStats = dbInbound.clientStats.find(stats => stats.email === email)
|
||||
return clientStats.down + clientStats.up > clientStats.total
|
||||
return clientStats ? clientStats.down + clientStats.up > clientStats.total : false
|
||||
},
|
||||
isClientEnabled(dbInbound, email) {
|
||||
clientStats = dbInbound.clientStats ? dbInbound.clientStats.find(stats => stats.email === email) : null
|
||||
|
||||
Reference in New Issue
Block a user