diff --git a/dictation_server/src/features/notification/notification.service.ts b/dictation_server/src/features/notification/notification.service.ts index 2d9edda..a329c08 100644 --- a/dictation_server/src/features/notification/notification.service.ts +++ b/dictation_server/src/features/notification/notification.service.ts @@ -54,9 +54,8 @@ export class NotificationService { } try { - // TODO: 登録毎に新規登録する想定でUUIDを付与している - // もしデバイスごとに登録を上書きするようであればUUID部分にデバイス識別子を設定 - const installationId = `${pns}_${userId}_${uuidv4()}`; + // installationIdにuserIdを設定し、1ユーザー1端末の登録にする + const installationId = `odms-user-${userId}`; this.logger.log(`[${context.getTrackingId()}] ${installationId}`); await this.notificationhubService.register( diff --git a/dictation_server/src/gateways/blobstorage/blobstorage.service.ts b/dictation_server/src/gateways/blobstorage/blobstorage.service.ts index fcd8301..65a71c6 100644 --- a/dictation_server/src/gateways/blobstorage/blobstorage.service.ts +++ b/dictation_server/src/gateways/blobstorage/blobstorage.service.ts @@ -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)) {