Fix about me in server

This commit is contained in:
Akif9748 2022-08-31 15:31:23 +03:00
parent e2e2b5bf59
commit 460a870784
2 changed files with 1 additions and 3 deletions

View File

@ -46,8 +46,6 @@ Akf-forum has got an API for AJAX, other clients etc. And, you can learn about A
- extra ratelimits
- better edits
- IP BAN fix
- APIDOCS query
- app.param for users in API
- message counts for API
- ZATEN SİLİNDİ BU KİŞİ & MESAJ
- delete thread for threads area

View File

@ -60,7 +60,7 @@ app.patch("/:id/", async (req, res) => {
if (req.user.id !== member.id && !req.user.admin) return res.error(403, "You have not got permission for this.");
const { avatar, name, about } = req.body;
if (!avatar && !name) return res.error(400, "Missing member informations in request body.");
if (!avatar && !name&& !about) return res.error(400, "Missing member informations in request body.");
if (avatar && /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)/g.test(avatar))
member.avatar = avatar;
if (name) {