mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-22 03:50:41 +03:00
Better reset
This commit is contained in:
parent
3bf0b75a7f
commit
49dbe2d73d
3 changed files with 4 additions and 3 deletions
|
@ -7,7 +7,7 @@ A Node.js based forum software.
|
|||
- Run `npm start` for run it.
|
||||
|
||||
### Extra
|
||||
Run `node util/reset` to **reset the database**, and run `node util/admin` for give admin perms to first member.
|
||||
Run `node util/reset` to **reset the database** for duplicate key errors, and run `node util/admin` for give admin perms to first member.
|
||||
Edit `config.json` for default themes of users, and forum name...
|
||||
|
||||
## API
|
||||
|
@ -44,6 +44,7 @@ Akf-forum has got an API for AJAX (fetch), other clients etc. And, you can learn
|
|||
- char limits in config.json
|
||||
- select -id for api
|
||||
- summary (∆) for ips of users in user page
|
||||
- admin list in admin panel.
|
||||
|
||||
## Major Version History
|
||||
- V4: Caching
|
||||
|
|
|
@ -13,7 +13,7 @@ app.post("/", rateLimit({
|
|||
|
||||
req.session.userID = null;
|
||||
|
||||
let { username = null, password: body_pass = null, about } = req.body;
|
||||
let { username, password: body_pass, about } = req.body;
|
||||
|
||||
if (!username || !body_pass) return res.error(400, "You forgot entering some values");
|
||||
if (username.length < 3 || username.length > 25) return res.error(400, "Username must be between 3 - 25 characters");
|
||||
|
|
|
@ -5,4 +5,4 @@ mongoose.connect(process.env.MONGO_DB_URL, () => console.log("Database is connec
|
|||
|
||||
const Models = require("../models");
|
||||
|
||||
Object.values(Models).forEach(model => model.deleteMany({}).then(console.log));
|
||||
Object.values(Models).forEach(model => model.collection.drop().then(console.log));
|
||||
|
|
Loading…
Reference in a new issue