feat(invitations): list all used invitations on detail view

This commit is contained in:
OldHawk
2017-06-15 10:57:39 +08:00
parent 43d3e9c3a3
commit d80f2eb7a8
8 changed files with 77 additions and 14 deletions

View File

@@ -71,12 +71,10 @@ exports.list = function (req, res) {
var findUsedInvitations = function (callback) {
Invitation.find({
where: {
user: req.user._id,
status: 2
}
status: {$gt: 0}
})
.sort('registeredat')
.sort('invitedat')
.populate('user')
.exec(function (err, invitations) {
if (err) {