feat(db): add pure isBanActive predicate matching Laravel ban filtering

This commit is contained in:
Simo committed 2026-06-27 14:33:51 +02:00
1 parent 5369f99b07
commit 3e3776b477
2 files changed
+27

No files matched your search

+5
View File
@@ -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;
}