IP名单中显示已过期标签

This commit is contained in:
GoEdgeLab
2021-11-17 21:18:33 +08:00
parent 103e1abd07
commit cf04edb1d1

View File

@@ -8,6 +8,7 @@ import (
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs/firewallconfigs"
"github.com/iwind/TeaGo/maps"
timeutil "github.com/iwind/TeaGo/utils/time"
"time"
)
type IndexAction struct {
@@ -122,6 +123,7 @@ func (this *IndexAction) RunGet(params struct {
"ipFrom": item.IpFrom,
"ipTo": item.IpTo,
"createdTime": timeutil.FormatTime("Y-m-d", item.CreatedAt),
"isExpired": item.ExpiredAt < time.Now().Unix(),
"expiredTime": expiredTime,
"reason": item.Reason,
"type": item.Type,