add another webring stat

indiachan-spamvector
Thomas Lynch 3 years ago
parent 0c0102ec0c
commit 61fa32c30c
  1. 16
      db/boards.js
  2. 2
      views/pages/home.pug

@ -326,12 +326,28 @@ module.exports = {
'total': {
'$sum': 1
},
'sites': {
'$addToSet': '$siteName'
},
'unlisted': {
'$sum': {
'$cond': ['$settings.unlistedLocal', 1, 0]
}
},
}
},
{
'$project': {
'_id': 1,
'posts': 1,
'pph': 1,
'ppd': 1,
'total': 1,
'sites': {
'$size': '$sites'
},
'unlisted': 1,
}
}
])
.toArray()

@ -65,4 +65,4 @@ block content
tr
td
pre.no-m-p
| There are currently #[span.bold #{webringStats.total}] boards in the known webring. Across all webring boards, #[span.bold #{webringStats.pph}] post#{webringStats.pph === 1 ? ' has' : 's have'} been made in the last hour, #[span.bold #{webringStats.posts}] in total.
| There are currently #[span.bold #{webringStats.sites}] sites and #[span.bold #{webringStats.total}] boards in the known webring. Across all webring boards, #[span.bold #{webringStats.pph}] post#{webringStats.pph === 1 ? ' has' : 's have'} been made in the last hour, #[span.bold #{webringStats.posts}] in total.

Loading…
Cancel
Save