diff --git a/apps/storage.json b/apps/storage.json index b2d5bc82e..c22736eea 100644 --- a/apps/storage.json +++ b/apps/storage.json @@ -1,5 +1,5 @@ { "type": "tildefriends-app", "emoji": "💾", - "previous": "&mvGTlWKFR5QM/3nb4fJ2WQq0n/gNKvBmhGDkAvb8ki8=.sha256" + "previous": "&tzZFIe7Y54O4sx1QtAPdemkXh+p5qHXSG/dlS7NP6OQ=.sha256" } diff --git a/apps/storage/app.js b/apps/storage/app.js index 7136f1653..7b6c89088 100644 --- a/apps/storage/app.js +++ b/apps/storage/app.js @@ -8,7 +8,7 @@ async function query(sql, args) { async function get_biggest() { return query(` - select author, sum(length(content)) as size from messages group by author order by size desc limit 10; + select author, size from messages_stats group by author order by size desc limit 10; `); } @@ -63,14 +63,15 @@ function nice_size(bytes) { async function main() { await app.setDocument( - '
Finding the top 10 largest feeds...
' + 'Analyzing feeds...
' ); - let most_follows = await get_most_follows(); + let most_follows = get_most_follows(); let total = await get_total(); let identities = await ssb.getAllIdentities(); let following1 = await ssb.following(identities, 1); let following2 = await ssb.following(identities, 2); let biggest = await get_biggest(); + most_follows = await most_follows; let names = await get_names( [].concat( biggest.map((x) => x.author), @@ -94,7 +95,7 @@ async function main() { } let html = `\n