Parcourir la source

rm unused model

abhishek9686 il y a 6 mois
Parent
commit
fd737e3281
2 fichiers modifiés avec 2 ajouts et 9 suppressions
  1. 1 8
      logic/acls.go
  2. 1 1
      pro/controllers/failover.go

+ 1 - 8
logic/acls.go

@@ -19,13 +19,6 @@ var (
 	aclCacheMap   = make(map[string]models.Acl)
 )
 
-type AclNetInfo struct {
-	DevicePolices       []models.Acl
-	UserPolicies        []models.Acl
-	DefaultDevicePolicy models.Acl
-	DefaultUserPolicy   models.Acl
-}
-
 func MigrateAclPolicies() {
 	acls := ListAcls()
 	for _, acl := range acls {
@@ -596,7 +589,7 @@ func IsPeerAllowed(node, peer models.Node, checkDefaultPolicy bool) bool {
 
 	}
 	// list device policies
-	policies := listDevicePolicies(models.NetworkID(node.Network))
+	policies := listDevicePolicies(models.NetworkID(peer.Network))
 	srcMap := make(map[string]struct{})
 	dstMap := make(map[string]struct{})
 	defer func() {

+ 1 - 1
pro/controllers/failover.go

@@ -300,7 +300,7 @@ func failOverME(w http.ResponseWriter, r *http.Request) {
 	logic.ReturnSuccessResponse(w, r, "relayed successfully")
 }
 
-// @Summary     Failover me
+// @Summary     checkfailOverCtx
 // @Router      /api/v1/node/{nodeid}/failover_check [get]
 // @Tags        PRO
 // @Param       nodeid path string true "Node ID"