Add eslint (#741)

This commit is contained in:
Calvin Montgomery 2018-04-07 15:30:30 -07:00 committed by GitHub
parent 953428cad5
commit 62417f7fb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 305 additions and 323 deletions

View file

@ -31,7 +31,7 @@ class AliasesDB {
return this.db.runTransaction(async tx => {
const query = tx.table('aliases');
if (net.isIP(ip)) {
query.where({ ip: ip })
query.where({ ip: ip });
} else {
const delimiter = /^[0-9]+\./.test(ip) ? '.' : ':';
query.where('ip', 'LIKE', ip + delimiter + '%');

View file

@ -1,6 +1,3 @@
import util from '../utilities';
import Promise from 'bluebird';
const LOGGER = require('@calzoneman/jsli')('GlobalBanDB');
class GlobalBanDB {

View file

@ -44,7 +44,7 @@ class PasswordResetDB {
cleanup(threshold = ONE_DAY) {
return this.db.runTransaction(tx => {
return tx.table('password_reset')
.where('expire', '<', Date.now() - ONE_DAY)
.where('expire', '<', Date.now() - threshold)
.del();
});
}