From b60c985203b3657865f5047d228d1b63b373357d Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 28 Feb 2023 15:31:48 +0900 Subject: [PATCH] =?UTF-8?q?fix(server):=20=E3=83=A1=E3=83=BC=E3=83=AB?= =?UTF-8?q?=E3=82=A2=E3=83=89=E3=83=AC=E3=82=B9=E6=9B=B4=E6=96=B0=E6=99=82?= =?UTF-8?q?=E3=81=AB=E3=83=90=E3=83=AA=E3=83=87=E3=83=BC=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E3=81=8C=E6=AD=A3=E3=81=97=E3=81=8F=E8=A1=8C=E3=82=8F?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E3=81=AE=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 ++++++++ .../backend/src/server/api/endpoints/i/update-email.ts | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb9ad1c10..50cfc746b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ You should also include the user name that made the change. --> +## 13.x.x (unreleased) + +### Improvements +- + +### Bugfixes +- fix(server): メールアドレス更新時にバリデーションが正しく行われていないのを修正 + ## 13.8.1 (2023/02/26) ### Bugfixes diff --git a/packages/backend/src/server/api/endpoints/i/update-email.ts b/packages/backend/src/server/api/endpoints/i/update-email.ts index b656c5c51..4f543a647 100644 --- a/packages/backend/src/server/api/endpoints/i/update-email.ts +++ b/packages/backend/src/server/api/endpoints/i/update-email.ts @@ -73,8 +73,8 @@ export default class extends Endpoint { } if (ps.email != null) { - const available = await this.emailService.validateEmailForAccount(ps.email); - if (!available) { + const res = await this.emailService.validateEmailForAccount(ps.email); + if (!res.available) { throw new ApiError(meta.errors.unavailable); } }