Small fixes

This commit is contained in:
Alireza Ahmadi
2023-03-01 19:52:21 +01:00
parent 9e398aaa65
commit 4f91375cb2
2 changed files with 1 additions and 3 deletions

View File

@@ -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)

View File

@@ -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