From 460a8707845cf1ad4dd6508e611d875dbdab8529 Mon Sep 17 00:00:00 2001 From: Akif9748 Date: Wed, 31 Aug 2022 15:31:23 +0300 Subject: [PATCH] Fix about me in server --- README.md | 2 -- routes/api/routes/users.js | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 0ac1ccf..966926e 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/routes/api/routes/users.js b/routes/api/routes/users.js index a2155b0..99965a2 100644 --- a/routes/api/routes/users.js +++ b/routes/api/routes/users.js @@ -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) {