From 18757e3243149c7256861126649b78e43072cc09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=AF=E6=9C=AC=20=E9=96=8B?= Date: Thu, 2 Nov 2023 06:00:36 +0000 Subject: [PATCH] =?UTF-8?q?Merged=20PR=20549:=20Users=E3=82=BF=E3=83=96?= =?UTF-8?q?=E3=82=92=E9=96=8B=E3=81=91=E3=81=AA=E3=81=84Bug=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task3019: 修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/3019) - 単体ユーザー取得の際、Selectを用いて必要なパラメータを指定していなかったので必須パラメータが欠けた状態で取得され、それがキャッシュされてしまった - ※キャッシュ実装時、Selectなしだと全部取れると勘違いしていた ## レビューポイント - 修正内容は妥当か? ## 動作確認状況 - ローカルで確認 --- dictation_server/src/gateways/adb2c/adb2c.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dictation_server/src/gateways/adb2c/adb2c.service.ts b/dictation_server/src/gateways/adb2c/adb2c.service.ts index 6997ee9..69bd890 100644 --- a/dictation_server/src/gateways/adb2c/adb2c.service.ts +++ b/dictation_server/src/gateways/adb2c/adb2c.service.ts @@ -197,7 +197,10 @@ export class AdB2cService { } // キャッシュ上に存在していなければ、ADB2Cから取得してキャッシュに保存する - const user = await this.graphClient.api(`users/${externalId}`).get(); + const user = await this.graphClient + .api(`users/${externalId}`) + .select(['id', 'displayName', 'identities']) + .get(); await this.redisService.set(key, user, this.ttl); this.logger.log(`[ADB2C GET] externalId: ${externalId}`);