summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorRealMANI <96433859+ImAaronFR@users.noreply.github.com>2022-02-20 07:55:44 +0330
committerErkin Alp Güney <erkinalp9035@gmail.com>2022-02-20 08:10:50 +0300
commit397085878e36024561f57b988594bbddc48512cb (patch)
treed8485b74617bdf1f2b97f0250fe233a1d4e17510 /api
parentBump url-parse from 1.5.3 to 1.5.7 in /bundle (diff)
downloadserver-397085878e36024561f57b988594bbddc48512cb.tar.xz
[Fix] Profile & banner uploading
Related to this issue https://github.com/fosscord/fosscord-server/pull/639#issuecomment-1046140968
Diffstat (limited to 'api')
-rw-r--r--api/src/routes/users/@me/index.ts2
1 files changed, 1 insertions, 1 deletions
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") }
 		});