数据有更改时发送通知

This commit is contained in:
GoEdgeLab
2021-08-08 15:47:48 +08:00
parent 07aa0990f8
commit e979414973
40 changed files with 548 additions and 185 deletions

View File

@@ -8,7 +8,6 @@ import (
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
"github.com/TeaOSLab/EdgeAPI/internal/db/models"
"github.com/TeaOSLab/EdgeAPI/internal/db/models/authority"
"github.com/TeaOSLab/EdgeAPI/internal/db/models/nameservers"
"github.com/TeaOSLab/EdgeAPI/internal/encrypt"
"github.com/TeaOSLab/EdgeAPI/internal/utils"
"github.com/iwind/TeaGo/lists"
@@ -187,7 +186,7 @@ func ValidateRequest(ctx context.Context, userTypes ...UserType) (userType UserT
nodeUserId = nodeIntId
resultNodeId = nodeIntId
case UserTypeDNS:
nodeIntId, err := nameservers.SharedNSNodeDAO.FindEnabledNodeIdWithUniqueId(nil, nodeId)
nodeIntId, err := models.SharedNSNodeDAO.FindEnabledNodeIdWithUniqueId(nil, nodeId)
if err != nil {
return UserTypeNode, nodeIntId, 0, errors.New("context: " + err.Error())
}