(userId: string)
| 28 | } |
| 29 | |
| 30 | record(userId: string): void { |
| 31 | const r = this.recent(userId); |
| 32 | r.push(Date.now()); |
| 33 | this.attempts.set(userId, r); |
| 34 | } |
| 35 | |
| 36 | /** Seconds until the oldest attempt in the window falls off (for Retry-After). */ |
| 37 | retryAfterSeconds(userId: string): number { |
no test coverage detected