From d2b6107e00ff2ed38215b406e658b5a0da7d341c Mon Sep 17 00:00:00 2001 From: RealMANI <96433859+ImAaronFR@users.noreply.github.com> Date: Sun, 20 Feb 2022 07:55:44 +0330 Subject: [PATCH] [Fix] Profile & banner uploading Related to this issue https://github.com/fosscord/fosscord-server/pull/639#issuecomment-1046140968 --- api/src/routes/users/@me/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts index acca8910..5834921c 100644 --- a/api/src/routes/users/@me/index.ts +++ b/api/src/routes/users/@me/index.ts @@ -58,7 +58,7 @@ router.patch("/", route({ body: "UserModifySchema" }), async (req: Request, res: } var check_username = body?.username?.replace(/\s/g, ''); - if(!check_username) { + if(!check_username && !body?.avatar && !body?.banner) { throw FieldErrors({ username: { code: "BASE_TYPE_REQUIRED", message: req.t("common:field.BASE_TYPE_REQUIRED") } });