+ topicPublishHistory(dbCtx, topicId, days) {
+ const _scope = _fileScope('topicPublishHistory');
+ 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;
+ }
+
+