topicPublishHistory returns Number[] instead of BigInt[]
[websub-hub] / src / db / postgres / index.js
index 3e97336992999adaee4a077c1f7ef9ddc7719a87..fc4ec8daa1b229ec353ebfeff8cf5ac3d917a6d8 100644 (file)
@@ -862,7 +862,7 @@ class DatabasePostgres extends Database {
 
     const events = await dbCtx.manyOrNone(this.statement.topicPublishHistory, { topicIds: [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;
   }