User: Fix type mismatch causing xp passed as a string to be appended

instead of being added as an increment.
This commit is contained in:
Minz committed 2022-09-12 03:58:51 +02:00
1 parent ed7096fac0
commit 9106192fd5
1 file changed
+1 -1
+1 -1
View File
@@ -18,7 +18,7 @@ module.exports = (sequelize, DataTypes) => {
async addExperience(amount) {
console.log(`Adding ${amount} experience to user ${this.id}`);
await this.update({
experience: this.experience + amount
experience: this.experience + parseInt(amount)
});
}
async getLevel() {