feat(db): add pure isBanActive predicate matching Laravel ban filtering
This commit is contained in:
1 parent
5369f99b07
commit
3e3776b477
2 files changed
+27
No files matched your search
@@ -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