From b07ede7f1bb7fa567d7d316af7a4e5bae2c4a68e Mon Sep 17 00:00:00 2001 From: "maruyama.t" Date: Tue, 16 May 2023 01:08:50 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20109:=20confirmUserAndInitPassword?= =?UTF-8?q?=E3=81=AEtry=E5=88=86=E3=81=AE=E4=B8=AD=E8=BA=AB=E3=81=AE?= =?UTF-8?q?=E9=A0=86=E5=BA=8F=E3=82=92=E5=85=A5=E3=82=8C=E6=9B=BF=E3=81=88?= =?UTF-8?q?=E3=82=8B=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task1755: confirmUserAndInitPasswordのtry分の中身の順序を入れ替える。](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/1755) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## UIの変更 - Before/Afterのスクショなど - スクショ置き場 ## 動作確認状況 - ローカルで確認、develop環境で確認など ## 補足 - 相談、参考資料などがあれば --- dictation_server/src/features/users/users.service.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dictation_server/src/features/users/users.service.ts b/dictation_server/src/features/users/users.service.ts index 7baefa7..d56e0e8 100644 --- a/dictation_server/src/features/users/users.service.ts +++ b/dictation_server/src/features/users/users.service.ts @@ -229,13 +229,12 @@ export class UsersService { // ユーザー情報からAzure AD B2CのIDを特定する const user = await this.usersRepository.findUserById(userId); const extarnalId = user.external_id; - // ユーザを認証済みにする - await this.usersRepository.updateUserVerified(userId); // パスワードを変更する await this.adB2cService.changePassword(extarnalId, ramdomPassword); + // ユーザを認証済みにする + await this.usersRepository.updateUserVerified(userId); // メールの送信元を取得 const from = this.configService.get('MAIL_FROM') ?? ''; - // XXX ODMS側が正式にメッセージを決めるまで仮のメール内容とする const subject = 'A temporary password has been issued.'; const text = 'temporary password: ' + ramdomPassword;