瀏覽代碼

fix: respect visit limit

poeti8 6 年之前
父節點
當前提交
82905d056e
共有 1 個文件被更改,包括 2 次插入0 次删除
  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({