make geoip lookup optional
This commit is contained in:
parent
43c728d5d4
commit
097d3c8377
2 changed files with 9 additions and 1 deletions
|
@ -1,9 +1,12 @@
|
|||
const crypto = require('crypto');
|
||||
const geoip = require('fxa-geodb')();
|
||||
const fetch = require('node-fetch');
|
||||
const config = require('./config');
|
||||
const pkg = require('../package.json');
|
||||
|
||||
const geoip = config.ip_db
|
||||
? require('fxa-geodb')({ dbPath: config.ip_db })
|
||||
: () => ({});
|
||||
|
||||
const HOUR = 1000 * 60 * 60;
|
||||
|
||||
function truncateToHour(timestamp) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue