up
This commit is contained in:
@@ -27,7 +27,9 @@ module.exports.createAward = [
|
||||
|
||||
module.exports.findAllUser = async (req, res) => {
|
||||
const toDay = new Date()
|
||||
const awards = await Award.find({ expireDate: { $gt: toDay }, isDeleted: false })
|
||||
const awards = await Award.find({
|
||||
// expireDate: { $gt: toDay },
|
||||
isDeleted: false })
|
||||
const awardsReq = await AwardRequest.find({ userId: req.user_id }).populate('awardId', '-created_at -updated_at')
|
||||
const score = await GPSUser.findById(req.user_id, { score: 1 })
|
||||
// eslint-disable-next-line array-callback-return
|
||||
@@ -49,7 +51,7 @@ module.exports.findAllUser = async (req, res) => {
|
||||
},
|
||||
status: 1
|
||||
}
|
||||
} else {
|
||||
} else if(award.expireDate < toDay){
|
||||
return {
|
||||
id: award.id,
|
||||
score: award.score,
|
||||
|
||||
Reference in New Issue
Block a user