Merged PR 954: NotificationHubへのデバイス登録方法を修正

## 概要
[Task4580: NotificationHubへのデバイス登録方法を修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/4580)

- NotificationHubのデバイス登録時に付与するInstallationIDをuuidからuserIdに変更

## 動作確認状況
- ローカルで確認、develop環境で確認など
- 修正範囲がNotificationHubのserviceに閉じているため、既存のテストが通ることを確認したのみ

## 補足
- 相談、参考資料などがあれば
This commit is contained in:
saito.k 2024-11-26 08:45:27 +00:00
parent a07cfe51aa
commit 11395279af
2 changed files with 11 additions and 3 deletions

View File

@ -54,9 +54,8 @@ export class NotificationService {
}
try {
// TODO: 登録毎に新規登録する想定でUUIDを付与している
// もしデバイスごとに登録を上書きするようであればUUID部分にデバイス識別子を設定
const installationId = `${pns}_${userId}_${uuidv4()}`;
// installationIdにuserIdを設定し、ユーザー端末の登録にする
const installationId = `odms-user-${userId}`;
this.logger.log(`[${context.getTrackingId()}] ${installationId}`);
await this.notificationhubService.register(

View File

@ -521,7 +521,16 @@ export class BlobstorageService {
} | params: { ` + `accountId: ${accountId} };`,
);
// アカウントIDをもとにblobのリージョンマッピング用テーブルからストレージアカウントの情報を取得する
const containerName = `account-${accountId}`;
if (accountId) {
const blobService = new BlobServiceClient(
'',
new StorageSharedKeyCredential('', ''),
);
return blobService.getContainerClient(containerName);
}
if (BLOB_STORAGE_REGION_US.includes(country)) {
return this.blobServiceClientUS.getContainerClient(containerName);
} else if (BLOB_STORAGE_REGION_AU.includes(country)) {