Skip to content

Commit

Permalink
fix: accumulate punishment time
Browse files Browse the repository at this point in the history
  • Loading branch information
ppolariss committed Nov 9, 2024
1 parent 71615ea commit c5fc210
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/punishment.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (punishment *Punishment) Create() (*User, error) {
if user.BanDivision[punishment.DivisionID] == nil {
user.BanDivision[punishment.DivisionID] = &punishment.EndTime
} else {
user.BanDivision[punishment.DivisionID].Add(*punishment.Duration)
*user.BanDivision[punishment.DivisionID] = user.BanDivision[punishment.DivisionID].Add(*punishment.Duration)
}
user.OffenceCount += 1

Expand Down

0 comments on commit c5fc210

Please sign in to comment.