upstash/lock

How to set one hour in slidingWindow

Closed this issue · 0 comments

Hey, I've been trying to setup my rate limiter like this:
const ratelimit = new Ratelimit({ redis: Redis.fromEnv(), limiter: Ratelimit.slidingWindow(2, '3600 s'), });
But it doesn't seem to work, there's a special way to reference an hour or theres a time limit?
Edit: sorry i posted this on the lock section without noticing