Browse Source

Merge branch 'master' of https://github.com/syzoj/syzoj

pull/6/head
Your Name 6 years ago
parent
commit
2486b34123
  1. 2
      models/rating_calculation.js

2
models/rating_calculation.js

@ -39,7 +39,7 @@ class RatingCalculation extends Model {
await history.destroy();
const ratingItem = (await RatingHistory.findOne({
where: { user_id: user.id },
order: 'rating_calculation_id DESC'
order: [['rating_calculation_id','DESC']]
}));
user.rating = ratingItem ? ratingItem.rating_after : syzoj.config.default.user.rating;
await user.save();

Loading…
Cancel
Save