Browse Source

Fix #91

pull/6/head
When 6 years ago committed by GitHub
parent
commit
4f37b3c969
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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