Sfoglia il codice sorgente

fix: respect visit limit

poeti8 6 anni fa
parent
commit
82905d056e
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      server/queues.ts

+ 2 - 0
server/queues.ts

@@ -29,6 +29,8 @@ visitQueue.process(({ data }) => {
   const location = geoip.lookup(data.realIP);
   const country = location && location.country;
 
+  if (data.visit_count > getStatsLimit()) return;
+
   return Promise.all([
     addLinkCount(data.link.id),
     createVisit({