From aa0bd09efdd69fefc2c2f91a985d932400ef826e Mon Sep 17 00:00:00 2001
From: Akif9748 <akif9748@gmail.com>
Date: Fri, 9 Sep 2022 21:40:02 +0300
Subject: [PATCH] Added apidocs for /me path

---
 APIDOCS.md          | 3 +++
 README.md           | 2 ++
 routes/api/index.js | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/APIDOCS.md b/APIDOCS.md
index 767ae60..1dc48ef 100644
--- a/APIDOCS.md
+++ b/APIDOCS.md
@@ -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.
diff --git a/README.md b/README.md
index 914a636..fbe7b8c 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/routes/api/index.js b/routes/api/index.js
index e75d5d4..73e3faa 100644
--- a/routes/api/index.js
+++ b/routes/api/index.js
@@ -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}`));