diff --git a/APIDOCS.md b/APIDOCS.md index 1dc48ef..de1f615 100644 --- a/APIDOCS.md +++ b/APIDOCS.md @@ -20,8 +20,8 @@ But in front end, the API will works with session. - GET `/api/bans/` fetch all bans. -- GET `/api/bans/:id` fetch a ban. -- DELETE `/api/bans/:id` for unban an IP adress. +- GET `/api/bans/:ip` fetch a ban. +- DELETE `/api/bans/:ip` for unban an IP adress. - POST `/api/bans?reason=flood` for ban an IP adress. diff --git a/routes/register.js b/routes/register.js index eb308bd..50d61ec 100644 --- a/routes/register.js +++ b/routes/register.js @@ -11,7 +11,8 @@ app.post("/", rateLimit({ windowMs: 24 * 60 * 60_000, max: 5, standardHeaders: true, legacyHeaders: false, handler: (_r, response, _n, options) => response.error(options.statusCode, "You are begin ratelimited") }), async (req, res) => { - req.session.destroy() + + req.session.userID=null; let { username = null, password: body_pass = null, avatar, about } = req.body;