data endpoint for entity 90008 (aka. a website)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: make sure to set the visitor after filtering

dusk 19bb57bc e553ee16

+3 -1
+3 -1
src/lib/visits.ts
··· 48 48 visitors.forEach((visitor, id, map) => { 49 49 if (currentTime - visitor.visits[0] > 1000 * VISITOR_EXPIRY_SECONDS) 50 50 map.delete(id) 51 - else 51 + else { 52 52 visitor.visits = visitor.visits.filter((since) => { 53 53 return currentTime - since < 1000 * VISITOR_EXPIRY_SECONDS 54 54 }) 55 + map.set(id, visitor) 56 + } 55 57 }) 56 58 // check whether the request is from a bot or not (this doesnt need to be accurate we just want to filter out honest bots) 57 59 if (isBot(request)) { return visitors }