mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-06 10:52:31 +01:00
[Fix] Profile & banner uploading
Related to this issue https://github.com/fosscord/fosscord-server/pull/639#issuecomment-1046140968
This commit is contained in:
parent
a5af14eddb
commit
397085878e
@ -58,7 +58,7 @@ router.patch("/", route({ body: "UserModifySchema" }), async (req: Request, res:
|
|||||||
}
|
}
|
||||||
|
|
||||||
var check_username = body?.username?.replace(/\s/g, '');
|
var check_username = body?.username?.replace(/\s/g, '');
|
||||||
if(!check_username) {
|
if(!check_username && !body?.avatar && !body?.banner) {
|
||||||
throw FieldErrors({
|
throw FieldErrors({
|
||||||
username: { code: "BASE_TYPE_REQUIRED", message: req.t("common:field.BASE_TYPE_REQUIRED") }
|
username: { code: "BASE_TYPE_REQUIRED", message: req.t("common:field.BASE_TYPE_REQUIRED") }
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user