X-Git-Url: http://git.squeep.com/?p=websub-hub;a=blobdiff_plain;f=src%2Fdb%2Fsqlite%2Findex.js;fp=src%2Fdb%2Fsqlite%2Findex.js;h=a30c9b4ff00c673902708c3011e2d88dbc874f4d;hp=76309d6c039f623749b575b2f1b1b20f9fb212e5;hb=43898cdd317a127bc45e8b3cb2f160df386760a1;hpb=9a8da0271b29a93dfe464e74b285c676b2ec0109 diff --git a/src/db/sqlite/index.js b/src/db/sqlite/index.js index 76309d6..a30c9b4 100644 --- a/src/db/sqlite/index.js +++ b/src/db/sqlite/index.js @@ -302,7 +302,7 @@ class DatabaseSQLite extends Database { throw new DBErrors.UnexpectedResult('did not upsert authentication'); } } catch (e) { - this.logger.error(_scope, 'failed', { error: e, identifier, scrubbedCredential }) + this.logger.error(_scope, 'failed', { error: e, identifier, scrubbedCredential }); throw e; } } @@ -558,7 +558,7 @@ class DatabaseSQLite extends Database { httpRemoteAddr: null, httpFrom: null, ...data, - } + }; this._subscriptionUpsertDataValidate(subscriptionData); let result; @@ -827,10 +827,11 @@ class DatabaseSQLite extends Database { topicPublishHistory(dbCtx, topicId, days) { const _scope = _fileScope('topicPublishHistory'); - this.logger.debug(_scope, 'called', { topicId, days }) + this.logger.debug(_scope, 'called', { topicId, days }); const events = this.statement.topicPublishHistory.all({ topicId, daysAgo: days }); const history = Array.from({ length: days }, () => 0); + // eslint-disable-next-line security/detect-object-injection events.forEach(({ daysAgo, contentUpdates }) => history[daysAgo] = Number(contentUpdates)); return history;