feat(db): add pure isBanActive predicate matching Laravel ban filtering
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// Mirrors Laravel's active-ban query: where('ban_expire', '>', time()).
|
||||
// ban_expire and now are both unix timestamps in seconds.
|
||||
export function isBanActive(ban: { banExpire: number }, nowUnixSeconds: number): boolean {
|
||||
return ban.banExpire > nowUnixSeconds;
|
||||
}
|
||||
Reference in New Issue
Block a user