mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 13:20:41 +03:00
Fix for req session
This commit is contained in:
parent
aa0bd09efd
commit
c06af31f26
2 changed files with 4 additions and 3 deletions
|
@ -20,8 +20,8 @@ But in front end, the API will works with session.
|
||||||
|
|
||||||
|
|
||||||
- GET `/api/bans/` fetch all bans.
|
- GET `/api/bans/` fetch all bans.
|
||||||
- GET `/api/bans/:id` fetch a ban.
|
- GET `/api/bans/:ip` fetch a ban.
|
||||||
- DELETE `/api/bans/:id` for unban an IP adress.
|
- DELETE `/api/bans/:ip` for unban an IP adress.
|
||||||
- POST `/api/bans?reason=flood` for ban an IP adress.
|
- POST `/api/bans?reason=flood` for ban an IP adress.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@ app.post("/", rateLimit({
|
||||||
windowMs: 24 * 60 * 60_000, max: 5, standardHeaders: true, legacyHeaders: false,
|
windowMs: 24 * 60 * 60_000, max: 5, standardHeaders: true, legacyHeaders: false,
|
||||||
handler: (_r, response, _n, options) => response.error(options.statusCode, "You are begin ratelimited")
|
handler: (_r, response, _n, options) => response.error(options.statusCode, "You are begin ratelimited")
|
||||||
}), async (req, res) => {
|
}), async (req, res) => {
|
||||||
req.session.destroy()
|
|
||||||
|
req.session.userID=null;
|
||||||
|
|
||||||
let { username = null, password: body_pass = null, avatar, about } = req.body;
|
let { username = null, password: body_pass = null, avatar, about } = req.body;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue