Merge pull request #742 from appwrite/fix-fcm-credentials

Fix fcm credentials
This commit is contained in:
Torsten Dittmann authored and GitHub committed 2024-02-01 17:36:14 +01:00
commit 757a327241
6 files changed
+9 -9

No files matched your search

@@ -186,7 +186,7 @@
providerId: providerId,
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
serverKey: $providerParams[$provider].serverKey
serviceAccountJSON: $providerParams[$provider].serviceAccountJSON
}
);
break;
@@ -101,7 +101,7 @@
providerId: $provider.$id,
name: $provider.name,
enabled: $provider.enabled,
serverKey: $provider.credentials['serverKey']
serviceAccountJSON: $provider.credentials['serviceAccountJSON']
};
break;
case Providers.APNS:
@@ -49,13 +49,13 @@ export const providers: ProvidersMap = {
description: 'Firebase Cloud Messaging',
configure: [
{
label: 'Server key (.json file)',
name: 'serverKey',
label: 'Service account JSON (.json file)',
name: 'serviceAccountJSON',
type: 'file',
allowedFileExtensions: ['json'],
placeholder: 'Enter server key',
placeholder: 'Enter service account JSON',
popover: [
'<b>How to get the FCM server key?</b>',
'<b>How to get the FCM service account JSON?</b>',
'Head to <b>Project settings -> Service accounts -> Generate new private key.</b>',
'Generating the new key will result in the download of a JSON file.'
]
@@ -186,7 +186,7 @@
providerId: providerId,
name: $providerParams[$provider].name,
enabled: $providerParams[$provider].enabled,
serverKey: $providerParams[$provider].serverKey
serviceAccountJSON: $providerParams[$provider].serviceAccountJSON
}
);
break;
@@ -96,7 +96,7 @@
providerId: id,
name: name,
enabled: true,
serverKey: ''
serviceAccountJSON: ''
};
break;
case Providers.APNS:
@@ -70,7 +70,7 @@ export type SendgridProviderParams = ProviderParams & {
*/
export type FCMProviderParams = ProviderParams & {
serverKey: string;
serviceAccountJSON: string;
};
export type APNSProviderParams = ProviderParams & {