Merge branch 'master' of github.com:Mailtrain-org/mailtrain into access

Conflicts:
	views/users/api.hbs
This commit is contained in:
Tomas Bures 2017-07-09 23:34:03 +02:00
commit ad1e4c58f5
21 changed files with 5088 additions and 284 deletions

View file

@ -98,7 +98,10 @@ module.exports.getQuery = (id, callback) => {
}
let limit = 300;
let treshold = 3600 * 6; // time..NOW..time+6h, 6 hour window after trigger target to detect it
// time..NOW..time + 24h, 24 hour window after trigger target to detect it
//We need a 24 hour window for triggers as the format for dates added via the API are stored as 00:00:00
let treshold = 3600 * 24;
let intervalQuery = (column, seconds, treshold) => column + ' <= NOW() - INTERVAL ' + seconds + ' SECOND AND ' + column + ' >= NOW() - INTERVAL ' + (treshold + seconds) + ' SECOND';