Merged PR 286: 不要なFCM向け処理を削除

## 概要
[Task2304: 不要なFCM向け処理を削除](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2304)

- 通知処理についてFCM向けの処理は仮検証コードなので削除しました。

## レビューポイント
- 削除内容に問題はないか

## UIの変更
- なし

## 動作確認状況
- ローカルで確認
This commit is contained in:
makabe.t 2023-07-31 08:22:33 +00:00
parent 781162f2d2
commit dc32b5ac67
3 changed files with 1 additions and 23 deletions

View File

@ -13,7 +13,7 @@ JWT_PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIEowIBAAKCAQEA5IZZNgDew9eGmu
JWT_PUBLIC_KEY="-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5IZZNgDew9eGmuFTezwd\nHYLSaJvUPPIKYoiOeVLD1paWNI517Vkaoh0ngprcKOdv6T1N07V4igK7mOim2zY3\nyCTR6wcWR3PfFJrl9vh5SOo79koZoJb27YiM4jtxfx2dezzp0T2GoNR5rRolPUbW\nFJXnDe0DVXYXpJLb4LAlF2XAyYX0SYKUVUsJnzm5k4xbXtnwPwVbpm0EdswBE6qS\nfiL9zWk9dvHoKzSnfSDzDFoFcEoVchawzYXf/MM1YR4wo5XyzECc6Q5Ah4z522//\nmBNNaDHv83Yuw3mGShT73iJ0JQdkTturshv2Ecma38r6ftrIwNYXw4VVatJM8+GO\nOQIDAQAB\n-----END PUBLIC KEY-----\n"
SENDGRID_API_KEY=xxxxxxxxxxxxxxxx
MAIL_FROM=xxxxx@xxxxx.xxxx
NOTIFICATION_HUB_NAME=ntf-odms-shared
NOTIFICATION_HUB_NAME=ntf-odms-dev
NOTIFICATION_HUB_CONNECT_STRING=XXXXXXXXXXXXXXXXXX
APP_DOMAIN=http://localhost:8081/
STORAGE_ACCOUNT_NAME_US=saodmsusdev

View File

@ -187,7 +187,6 @@ export const TAG_MAX_COUNT = 20;
export const PNS = {
WNS: 'wns',
APNS: 'apns',
FCM: 'fcm',
};
/**

View File

@ -5,12 +5,9 @@ import {
createAppleNotificationBody,
createAppleNotification,
createTagExpression,
createFcmLegacyNotification,
createWindowsToastNotification,
createFirebaseLegacyNotificationBody,
createWindowsInstallation,
createAppleInstallation,
createFcmLegacyInstallation,
} from '@azure/notification-hubs';
import { TAG_MAX_COUNT } from '../../constants';
import { PNS } from '../../constants';
@ -62,11 +59,6 @@ export class NotificationhubService {
createAppleInstallation(installation),
);
break;
case PNS.FCM:
await this.client.createOrUpdateInstallation(
createFcmLegacyInstallation(installation),
);
break;
default:
throw new Error('invalid pns');
}
@ -117,19 +109,6 @@ export class NotificationhubService {
} catch (e) {
this.logger.error(`error=${e}`);
}
// Android
try {
const body = createFirebaseLegacyNotificationBody({
data: { message: message },
});
const notification = createFcmLegacyNotification({ body });
const result = await this.client.sendNotification(notification, {
tagExpression,
});
this.logger.log(result);
} catch (e) {
this.logger.error(`error=${e}`);
}
}
} catch (e) {
throw e;