summary refs log tree commit diff
path: root/src/middlewares/RateLimit.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-01-30 23:55:32 +0100
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-01-30 23:55:32 +0100
commitd2795bdd0a599cffefa26e93f4acbe5f3554b120 (patch)
tree3c8c3e6bcb555e79ab7e5f5e92c6ca51412d7279 /src/middlewares/RateLimit.ts
parentMerge branch 'master' of https://github.com/discord-open-source/discord-server (diff)
downloadserver-d2795bdd0a599cffefa26e93f4acbe5f3554b120.tar.xz
:zap: Convert BitField to BigInt
Diffstat (limited to '')
-rw-r--r--src/middlewares/RateLimit.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/middlewares/RateLimit.ts b/src/middlewares/RateLimit.ts

index abfc1c3d..6c4a1080 100644 --- a/src/middlewares/RateLimit.ts +++ b/src/middlewares/RateLimit.ts
@@ -4,7 +4,7 @@ import { getIpAdress } from "./GlobalRateLimit"; export function RateLimit({ count = 10, timespan = 1000 * 5, name = "/" }) { return async (req: Request, res: Response, next: NextFunction) => { - let id = req.userid || getIpAdress(req); // TODO: .replaceAll(".", "_"); // for ip adress replace all dots to save in database + let id = req.userid || getIpAdress(req); const limit: { count: number; start: number } = (await db.data.ratelimit.routes[name][id].get()) || { count: 0,