fix: rate limiting по пользователям из JWT + cleanup WebPush подписок и cooldown sync-push

This commit is contained in:
2026-08-20 14:17:13 +03:00
parent 5ff2aaa023
commit 281f8da995
4 changed files with 98 additions and 15 deletions

View File

@@ -2,7 +2,7 @@ import { storage } from '../storage';
import { webPushService } from '../services/web-push.service';
import { eventBus } from '../routes/shared';
const SYNC_PUSH_COOLDOWN_MS = 60_000;
const SYNC_PUSH_COOLDOWN_MS = 5 * 60 * 1000; // 5 minutes
const lastPushByOrganization = new Map<number, number>();
/**