Add eslint (#741)
This commit is contained in:
parent
953428cad5
commit
62417f7fb8
72 changed files with 305 additions and 323 deletions
|
|
@ -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 + '%');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
import util from '../utilities';
|
||||
import Promise from 'bluebird';
|
||||
|
||||
const LOGGER = require('@calzoneman/jsli')('GlobalBanDB');
|
||||
|
||||
class GlobalBanDB {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue