From 2cf383349909e0d6ea90bab7e7a4c7e256e39130 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Sun, 13 Aug 2023 15:18:42 +1000 Subject: remove INVALID_PASSWORD error response. close #1090 --- src/api/routes/auth/login.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/api/routes/auth/login.ts b/src/api/routes/auth/login.ts index cc5a2063..a2100333 100644 --- a/src/api/routes/auth/login.ts +++ b/src/api/routes/auth/login.ts @@ -93,6 +93,10 @@ router.post( message: req.t("auth:login.INVALID_LOGIN"), code: "INVALID_LOGIN", }, + password: { + message: req.t("auth:login.INVALID_LOGIN"), + code: "INVALID_LOGIN", + }, }); }); @@ -103,9 +107,13 @@ router.post( ); if (!same_password) { throw FieldErrors({ + login: { + message: req.t("auth:login.INVALID_LOGIN"), + code: "INVALID_LOGIN", + }, password: { - message: req.t("auth:login.INVALID_PASSWORD"), - code: "INVALID_PASSWORD", + message: req.t("auth:login.INVALID_LOGIN"), + code: "INVALID_LOGIN", }, }); } -- cgit 1.4.1