1- import { IPSet } from ' futoin-ipset' ;
2- import SetType from ' ./enums/set-type' ;
1+ import { IPSet } from " futoin-ipset" ;
2+ import SetType from " ./enums/set-type" ;
33
44export class ActionSet {
55 private multiSet : Object ;
@@ -9,7 +9,7 @@ export class ActionSet {
99 }
1010
1111 public add ( setType : SetType , item : string , ts ?: number , ttl ?: number ) {
12- const expireTs = ( ts && ttl !== - 1 ) ? ts + ttl * 1000 : - 1 ;
12+ const expireTs = ts && ttl !== - 1 ? ts + ttl * 1000 : - 1 ;
1313 const set = this . getSet ( setType ) ;
1414
1515 if ( setType === SetType . IP ) {
@@ -68,7 +68,7 @@ export class ActionSet {
6868 ip : new IPSet ( ) ,
6969 path : new Map < string , Number > ( ) ,
7070 user : new Map < string , Number > ( ) ,
71- country : new Map < string , Number > ( )
71+ country : new Map < string , Number > ( ) ,
7272 } ;
7373 }
7474
@@ -102,7 +102,7 @@ export class ActionSet {
102102
103103 for ( let [ sub , m ] of set . _v6 . _pm ) {
104104 for ( let key of m . keys ( ) ) {
105- set . has ( key + "/" + sub ) ;
105+ this . has ( setType , key + "/" + sub ) ;
106106 }
107107 }
108108 } else {
0 commit comments