fix: 🐛 don't convert time since epoch for ratelimit

https://calckey.social/notes/9gkasnzglmi07rpa
This commit is contained in:
ThatOneCalculator 2023-06-28 23:04:40 -07:00
parent 0015afaca8
commit 5343c14184
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -79,7 +79,7 @@ export const limiter = (
if (info.remaining === 0) {
reject({
message: "RATE_LIMIT_EXCEEDED",
remainingTime: convertMilliseconds(info.resetMs),
remainingTime: convertMilliseconds(info.resetMs - Date.now()),
});
} else {
ok();