mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 17:37:27 +08:00
[O] Correctly compute rating change
This commit is contained in:
@@ -82,6 +82,13 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set beforeRating in recent to the last play's afterRating
|
||||||
|
user.recent.forEach((it, i) => {
|
||||||
|
if (i < user.recent.length - 1) {
|
||||||
|
it.beforeRating = user.recent[i + 1].afterRating
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const minDate = moment().subtract(TREND_DAYS, 'days').format("YYYY-MM-DD")
|
const minDate = moment().subtract(TREND_DAYS, 'days').format("YYYY-MM-DD")
|
||||||
d = {user,
|
d = {user,
|
||||||
trend: trend.filter(it => it.date >= minDate && it.plays != 0),
|
trend: trend.filter(it => it.date >= minDate && it.plays != 0),
|
||||||
|
|||||||
Reference in New Issue
Block a user