Skip to content

Commit 54f80ff

Browse files
committed
feat(RateLimiter): add remaining() method to check requests left for an IP
1 parent 26820c4 commit 54f80ff

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

utils/tracking.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export function trackUser(username: string) {
22
if (typeof navigator === 'undefined' || typeof window === 'undefined') return;
3+
if (!username) return;
34

45
const payload = JSON.stringify({ username });
56

0 commit comments

Comments
 (0)