Skip to content

Commit

Permalink
fix?
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Dec 25, 2022
1 parent 7f0eb6d commit bf56b5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ getInstancesInfos()
.then(async ({alives, deads, notMisskey, outdated, versions, versionOutput}) => {
fs.writeFile('./dist/versions.json', JSON.stringify(versionOutput), () => { })

const stats = alives.reduce((prev, v) => v.nodeinfo.usage && v.nodeinfo.usage.users ? ({
notesCount: v.nodeinfo.usage.localPosts || 0 + prev.notesCount,
usersCount: v.nodeinfo.usage.users.total || 0 + prev.usersCount,
mau: v.nodeinfo.usage.users.activeMonth || 0 + prev.mau,
const stats = alives.reduce((prev, v) => (v.nodeinfo.usage && v.nodeinfo.usage.users) ? {
notesCount: (v.nodeinfo.usage.localPosts || 0) + prev.notesCount,
usersCount: (v.nodeinfo.usage.users.total || 0) + prev.usersCount,
mau: (v.nodeinfo.usage.users.activeMonth || 0) + prev.mau,
instancesCount: 1 + prev.instancesCount
}) : prev, { notesCount: 0, usersCount: 0, mau: 0, instancesCount: 0 })
} : { ...prev }, { notesCount: 0, usersCount: 0, mau: 0, instancesCount: 0 })

fs.writeFile('./dist/alives.txt', alives.map(v => v.url).join('\n'), () => { })
fs.writeFile('./dist/deads.txt', deads.map(v => v.url).join('\n'), () => { })
Expand Down

0 comments on commit bf56b5d

Please sign in to comment.