summary refs log tree commit diff
path: root/api/src
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-07 23:37:05 +1000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2022-07-07 23:37:05 +1000
commitaa3c3abcabc4d66691a949897fa9bafaaae6048f (patch)
tree4b26b0df6cfd051afca08c2217c6df81a9d32a0b /api/src
parentSomehow the ID of demo user changed. Use email of demo instead (diff)
parentMerge branch 'master' into fix/claim_accounts (diff)
downloadserver-aa3c3abcabc4d66691a949897fa9bafaaae6048f.tar.xz
Merge branch 'fix/claim_accounts' into slowcord
Diffstat (limited to 'api/src')
-rw-r--r--api/src/routes/users/@me/index.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/api/src/routes/users/@me/index.ts b/api/src/routes/users/@me/index.ts
index 902a2e45..add9417b 100644
--- a/api/src/routes/users/@me/index.ts
+++ b/api/src/routes/users/@me/index.ts
@@ -54,6 +54,8 @@ router.patch("/", route({ body: "UserModifySchema" }), async (req: Request, res:
 		body.email = adjustEmail(body.email);
 		if (!body.email)
 			throw FieldErrors({ email: { message: req.t("auth:register.EMAIL_INVALID"), code: "EMAIL_INVALID" } });
+		if (!body.password)
+			throw FieldErrors({ password: { message: req.t("auth:register.INVALID_PASSWORD"), code: "INVALID_PASSWORD" } })
 	}
 
 	if (body.new_password) {