⚡ Convert BitField to BigInt

This commit is contained in:
Flam3rboy
2021-01-30 23:55:32 +01:00
parent e11f94337b
commit d2795bdd0a
6 changed files with 78 additions and 71 deletions
+1 -1
View File
@@ -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,