mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-22 12:00:41 +03:00
abs
This commit is contained in:
parent
0fba3dca03
commit
538108da94
1 changed files with 1 additions and 1 deletions
2
index.js
2
index.js
|
@ -36,7 +36,7 @@ app.use(
|
|||
next();
|
||||
}, rateLimit({
|
||||
windowMs: 60_000, max: 10,
|
||||
handler: (req, res, next, opts) => !req.user.admin ? res.error(opts.statusCode, "You are begin ratelimited") : next()
|
||||
handler: (req, res, next, opts) => !req.user?.admin ? res.error(opts.statusCode, "You are begin ratelimited") : next()
|
||||
}), bodyParser.urlencoded({ extended: true })
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue