mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-12-22 23:59:08 +03:00
Added apidocs for /me path
This commit is contained in:
parent
980deb7db2
commit
aa0bd09efd
3 changed files with 6 additions and 1 deletions
|
@ -16,6 +16,9 @@ But in front end, the API will works with session.
|
|||
## How to request?
|
||||
|
||||
### Request types:
|
||||
- GET `/api/me` to get your account.
|
||||
|
||||
|
||||
- GET `/api/bans/` fetch all bans.
|
||||
- GET `/api/bans/:id` fetch a ban.
|
||||
- DELETE `/api/bans/:id` for unban an IP adress.
|
||||
|
|
|
@ -13,6 +13,8 @@ Edit `config.json` for default themes of users, and forum name...
|
|||
## API
|
||||
Akf-forum has got an API for AJAX (fetch), other clients etc. And, you can learn about API in `APIDOCS.md`.
|
||||
|
||||
**And you can use [offical API wrapper](https://github.com/Akif9748/akf-forum-api).**
|
||||
|
||||
## Credits
|
||||
* [Akif9748](https://github.com/Akif9748) - Project mainteiner, main developer, made **old** frontend
|
||||
* [Tokmak](https://github.com/tokmak0) - Made **new** frontend
|
||||
|
|
|
@ -33,7 +33,7 @@ app.use(async (req, res, next) => {
|
|||
next();
|
||||
});
|
||||
|
||||
app.post("/me", (req, res) => res.complate(req.user))
|
||||
app.get("/me", (req, res) => res.complate(req.user))
|
||||
|
||||
for (const file of fs.readdirSync("./routes/api/routes"))
|
||||
app.use("/" + file.replace(".js", ""), require(`./routes/${file}`));
|
||||
|
|
Loading…
Reference in a new issue