1
1
Fork 0
mirror of https://github.com/Akif9748/akf-forum.git synced 2025-07-16 11:41:00 +03:00
akf-forum/lib.js
Akif9748 db61361a95 Major update named as minor!
Forum Setup page,
edit forum config w/api
ban user's all ips,
secretmodel deleted,
/undelete is disabled
and better themes
if user reacted a message, view it
fixs for reactions of messages
discord auth in config.json
2022-09-23 23:10:13 +03:00

13 lines
No EOL
424 B
JavaScript

const RL = require('express-rate-limit');
module.exports = {
threadEnum: ["OPEN", "APPROVAL", "DELETED"],
themes: ["default", "black"],
RL(windowMs = 60_000, max = 1) {
return RL({
windowMs, max, standardHeaders: true, legacyHeaders: false,
handler: (req, res, next, opts) => !req.user?.admin ? res.error(opts.statusCode, "You are begin ratelimited") : next()
})
}
}