From 434e3d9c27f8fc58650db9783c6474b2cc14be8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E6=9C=AC=20=E7=A5=90=E5=B8=8C?= Date: Wed, 18 Oct 2023 02:02:38 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20502:=20users.repository.service?= =?UTF-8?q?=E3=81=AE=E3=83=AD=E3=82=B0=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2859: users.repository.serviceのログ修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2859) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど idTokenとversionのログ出力が正常にできるよう修正 - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## UIの変更 - Before/Afterのスクショなど - スクショ置き場 ## 動作確認状況 - ローカルで確認 ## 補足 - 相談、参考資料などがあれば --- dictation_server/src/features/auth/auth.service.ts | 2 +- .../src/repositories/users/users.repository.service.ts | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dictation_server/src/features/auth/auth.service.ts b/dictation_server/src/features/auth/auth.service.ts index 5bf1911..cae01fa 100644 --- a/dictation_server/src/features/auth/auth.service.ts +++ b/dictation_server/src/features/auth/auth.service.ts @@ -343,7 +343,7 @@ export class AuthService { ): Promise { this.logger.log( `[IN] [${context.trackingId}] ${this.isAcceptedLatestVersion.name} | params: { ` + - `idToken: ${idToken}, };`, + `idToken.sub: ${idToken.sub}, };`, ); try { diff --git a/dictation_server/src/repositories/users/users.repository.service.ts b/dictation_server/src/repositories/users/users.repository.service.ts index 16555c2..1868c94 100644 --- a/dictation_server/src/repositories/users/users.repository.service.ts +++ b/dictation_server/src/repositories/users/users.repository.service.ts @@ -337,7 +337,8 @@ export class UsersRepositoryService { return await this.dataSource.transaction(async (entityManager) => { const repo = entityManager.getRepository(User); - const accountId = (await repo.findOne({ where: { external_id } }))?.account_id; + const accountId = (await repo.findOne({ where: { external_id } })) + ?.account_id; if (!accountId) { throw new AccountNotFoundError('Account is Not Found.'); @@ -470,9 +471,9 @@ export class UsersRepositoryService { }, }); - if (!latestEulaInfo || !latestDpaInfo) { + if (!latestEulaInfo.version || !latestDpaInfo.version) { throw new TermInfoNotFoundError( - `Terms info is not found. latestEulaInfo: ${latestEulaInfo}, latestDpaInfo: ${latestDpaInfo}`, + `Terms info is not found. latestEulaInfo: ${latestEulaInfo.version}, latestDpaInfo: ${latestDpaInfo.version}`, ); }