Skip to content

Commit

Permalink
fix: change FCM ApiKey to Server Key label as displayed in firebase c…
Browse files Browse the repository at this point in the history
…onsole (#12133)
  • Loading branch information
lazpavel committed Mar 6, 2023
1 parent 05d748a commit a595186
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/amplify-category-notifications/src/channel-fcm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const enable = async (context: $TSContext, successMessage: string | undef
channelOutput = context.exeInfo.serviceMeta.output[channelName];
}
answers = {
ApiKey: await prompter.input('ApiKey', { initial: channelOutput.ApiKey, transform: (input) => input.trim() }),
ApiKey: await prompter.input('Server Key', { initial: channelOutput.ApiKey, transform: (input) => input.trim() }),
};
}

Expand Down Expand Up @@ -80,8 +80,8 @@ export const enable = async (context: $TSContext, successMessage: string | undef
const validateInputParams = (channelInput: $TSAny): $TSAny => {
if (!channelInput.ApiKey) {
throw new AmplifyError('UserInputError', {
message: 'ApiKey is missing for the FCM channel',
resolution: 'Provide the ApiKey for the FCM channel',
message: 'Server Key is missing for the FCM channel',
resolution: 'Server Key for the FCM channel',
});
}
return channelInput;
Expand All @@ -102,10 +102,9 @@ export const disable = async (context: $TSContext): Promise<$TSAny> => {
channelOutput = context.exeInfo.serviceMeta.output[channelName];
}
answers = {
ApiKey: await prompter.input('ApiKey', { initial: channelOutput.ApiKey, transform: (input) => input.trim() }),
ApiKey: await prompter.input('Server Key', { initial: channelOutput.ApiKey, transform: (input) => input.trim() }),
};
}

const params = {
ApplicationId: context.exeInfo.serviceMeta.output.Id,
GCMChannelRequest: {
Expand Down

0 comments on commit a595186

Please sign in to comment.