Skip to content

Commit

Permalink
fix: negative
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSoZRious authored Mar 31, 2024
1 parent d568b18 commit 2c7b354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/server/src/models/history.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class GameHistoryRepository {
if (k !== `game::${game_id}::${key}`) {
const kTotal = parseInt((await this.redis.get(k)) || '0')
if (kTotal > total - vote) {
this.redis.decrBy(k, Math.round((kTotal - total + vote) * 0.1))
this.redis.decrBy(k, Math.floor((kTotal - total + vote) * 0.1))
}
}
})
Expand Down

0 comments on commit 2c7b354

Please sign in to comment.