summary refs log tree commit diff
path: root/src/api/routes/users/@me
diff options
context:
space:
mode:
authorTomatoCake <60300461+DEVTomatoCake@users.noreply.github.com>2024-08-08 18:03:13 +0200
committerTomatoCake <60300461+DEVTomatoCake@users.noreply.github.com>2024-08-08 18:03:13 +0200
commit4ca79adcaeadb63113789a699c8f2eadb9ffd55c (patch)
treed426e44431b6bc09c9292a525489424249ef034d /src/api/routes/users/@me
parentPrettier (diff)
parentMerge pull request #1156 from DEVTomatoCake/fix/messages-before-param (diff)
downloadserver-ts-4ca79adcaeadb63113789a699c8f2eadb9ffd55c.tar.xz
Merge branch 'master' into feat/webhooks-3
Diffstat (limited to 'src/api/routes/users/@me')
-rw-r--r--src/api/routes/users/@me/index.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/api/routes/users/@me/index.ts b/src/api/routes/users/@me/index.ts

index ad11a4281..cddc3a087 100644 --- a/src/api/routes/users/@me/index.ts +++ b/src/api/routes/users/@me/index.ts
@@ -120,7 +120,7 @@ router.patch( if (!body.password) throw FieldErrors({ password: { - message: req.t("auth:register.INVALID_PASSWORD"), + message: req.t("auth:login.INVALID_PASSWORD"), code: "INVALID_PASSWORD", }, }); @@ -160,6 +160,15 @@ router.patch( }, }); } + + if (!body.password) { + throw FieldErrors({ + password: { + message: req.t("auth:login.INVALID_PASSWORD"), + code: "INVALID_PASSWORD", + }, + }); + } } if (body.discriminator) {