mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fix invites count calculation for admin dashboard
This commit is contained in:
parent
f4e0fc8e01
commit
af803ce0e6
@ -9,7 +9,7 @@ export default {
|
||||
countPosts: 'Post',
|
||||
countComments: 'Comment',
|
||||
countNotifications: 'NOTIFIED',
|
||||
countInvites: 'InvitationCode',
|
||||
countEmails: 'EmailAddress',
|
||||
countFollows: 'FOLLOWS',
|
||||
countShouts: 'SHOUTED',
|
||||
}
|
||||
@ -28,6 +28,11 @@ export default {
|
||||
const stat = statistics[mapping[key]]
|
||||
response[key] = stat ? stat.toNumber() : 0
|
||||
})
|
||||
|
||||
/*
|
||||
* Note: invites count is calculated this way because invitation codes are not in use yet
|
||||
*/
|
||||
response.countInvites = response.countEmails - response.countUsers
|
||||
} finally {
|
||||
session.close()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user