eventlog: fix cleanup

This commit is contained in:
Girish Ramakrishnan
2021-06-05 21:20:32 -07:00
parent 579c046944
commit eb16e8a8ee
2 changed files with 2 additions and 2 deletions

View File

@@ -179,7 +179,7 @@ async function getAllPaged(actions, search, page, perPage) {
async function cleanup(options) {
assert.strictEqual(typeof options, 'object');
const creationTime = options.creationTime || new Date(Date.now() - 60 * 60 * 24 * 10 * 1000); // 10 days ago
const creationTime = options.creationTime;
const results = await database.query('SELECT * FROM eventlog WHERE creationTime <= ?', [ creationTime ]);