File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -139,8 +139,9 @@ const openRoutes = {
139139 const query = url . parse ( req . url , true ) . query ;
140140 if ( query . referer ? payment . referer === query . referer : true ) {
141141 const email = payment . email ;
142- const isFresh = query . startDate ? ( Date . parse ( payment . date ) - Date . parse ( query . startDate ) > 0 ) : true ;
143- if ( isFresh && email ) {
142+ const isFreshStart = query . startDate ? ( Date . parse ( payment . date ) - Date . parse ( query . startDate ) > 0 ) : true ;
143+ const isFreshEnd = query . endDate ? ( Date . parse ( query . endDate ) - Date . parse ( payment . date ) > 0 ) : true ;
144+ if ( isFreshStart && isFreshEnd && email ) {
144145 const currentAmount = ( subscribers [ email ] && subscribers [ email ] . amount ) || 0 ;
145146 payment . amount += currentAmount ;
146147 subscribers [ email ] = payment ;
You can’t perform that action at this time.
0 commit comments