Kaynağa Gözat

fix: respect visit limit

poeti8 6 yıl önce
ebeveyn
işleme
82905d056e
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  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({