Skip to content

Commit c647a04

Browse files
committedNov 29, 2024
Fix timestamps in bans
1 parent bbcaded commit c647a04

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
 

‎src/gameserver/model/player-ban.entity.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class PlayerBanEntity {
77
@PrimaryColumn()
88
steam_id: string;
99

10-
@Column()
10+
@Column({ type: "timestamptz" })
1111
endTime: Date;
1212

1313
@Column()
@@ -16,7 +16,7 @@ export class PlayerBanEntity {
1616
public asBanStatus(): BanStatus {
1717
return new BanStatus(
1818
new Date().getTime() < this.endTime.getTime(),
19-
this.endTime.getTime(),
19+
this.endTime.toISOString(),
2020
this.reason,
2121
);
2222
}

‎src/rest/dto/player.dto.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export class PlayerSummaryDto extends LeaderboardEntryDto {
3434
export class BanStatusDto {
3535
public readonly steam_id: string;
3636
public readonly isBanned: boolean;
37-
public readonly bannedUntil: number;
37+
// iso
38+
public readonly bannedUntil: string;
3839

3940
@ApiProperty({ enum: BanReason, enumName: 'BanReason' })
4041
public readonly status: BanReason;

0 commit comments

Comments
 (0)
Please sign in to comment.