Skip to content

Commit

Permalink
fix(medals): fixed medal issue
Browse files Browse the repository at this point in the history
  • Loading branch information
taobataoma committed Jun 28, 2018
1 parent b638cfd commit 4b1c354
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
6 changes: 1 addition & 5 deletions config/env/torrents.js
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ module.exports = {
* @activeMoreScorePerDay: idle more than one day need extra score
* @activeMoreScorePerLevel: idle each level need extra score
* @notIdleSafeLevel: safe lavel, more than this level account not to be idle status
* @unIdleMedalName: if user has these medal, the account do not to be idle status, value must be a Array
*/
sign: {
openSignup: true,
Expand All @@ -427,8 +426,7 @@ module.exports = {
activeIdleAccountBasicScore: 50000,
activeMoreScorePerDay: 100,
activeMoreScorePerLevel: 1000,
notIdleSafeLevel: 30,
unIdleMedalName: ['roam']
notIdleSafeLevel: 30
}
},

Expand Down Expand Up @@ -1323,7 +1321,6 @@ module.exports = {
* @noticeMsg: notice translate string show at top of home
* @noticeShowAt: notice begin time to show
* @timeFormats: time string format
* @exceptExaminationMedalName: except examination user must have medal name of 'noExamination', value must is a Array
* @detailUrl: detail info of examination, maybe a forum link url
* ------------------------------------------------------------------------------
* !IMPORTANT NOTE:
Expand All @@ -1346,7 +1343,6 @@ module.exports = {
noticeShowAt: '2018-01-28 00:00:00',
timeFormats: 'YYYY-MM-DD HH:mm:ss'
},
exceptExaminationMedalName: ['noExamination'],
detailUrl: '/forums/595c4491d5706705f67d93cf/59684780f928f42a9c79c613'
},

Expand Down
3 changes: 1 addition & 2 deletions config/lib/cron-job.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ function checkUserAccountIdleStatus() {
isOper: false,
isAdmin: false,
last_signed: {$lt: Date.now() - signConfig.idle.accountIdleForTime},
score: {$lt: safeScore},
medal: {$nin: signConfig.idle.unIdleMedalName}
score: {$lt: safeScore}
}).exec(function (err, users) {
if (users) {
users.forEach(function (u) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ exports.initExaminationData = function (req, res) {
status: 'normal',
isVip: false,
isOper: false,
isAdmin: false,
medals: {$nin: examinationConfig.exceptExaminationMedalName}
isAdmin: false
}, {examinationData: exami}, {multi: true}, function (err, num) {
if (err) {
return res.status(422).send({
Expand Down

0 comments on commit 4b1c354

Please sign in to comment.