topicPublishHistory returns Number[] instead of BigInt[]
[websub-hub] / src / db / sqlite / index.js
index cc4ea90af056db2c99f747f2705e25829801749a..31471bafb850c9d761ffc19931968658eb093258 100644 (file)
@@ -828,7 +828,7 @@ class DatabaseSQLite extends Database {
 
     const events = this.statement.topicPublishHistory.all({ topicId, daysAgo: days });
     const history = Array.from({ length: days }, () => 0);
-    events.forEach(({ daysAgo, contentUpdates }) => history[daysAgo] = contentUpdates);
+    events.forEach(({ daysAgo, contentUpdates }) => history[daysAgo] = Number(contentUpdates));
 
     return history;
   }