Skip to content

Commit

Permalink
Merge pull request #31 from fossamagna/feat/support-appId-for-each-env
Browse files Browse the repository at this point in the history
feat: support to save appId for each environment
  • Loading branch information
fossamagna authored Jan 6, 2023
2 parents 5a9374f + e950ae3 commit 2998e07
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export async function createWalkthrough(
category: string,
options: Options
) {
const { amplify } = context;
const params = await askSlackAppType(context);
options.useFunctionUrl = params.template === amplifySlackAppTemplateName;

Expand All @@ -40,6 +41,8 @@ export async function createWalkthrough(
const resourceName = functionName; // use functionName as resourceName of consolenotification category

await copyCfnTemplate(context, category, resourceName, options);
const envSpecificParams = { appId: getAppId(context) };
amplify.saveEnvResourceParameters(context, category, resourceName, envSpecificParams)

const backendConfigs = {
service: options.service,
Expand Down Expand Up @@ -95,13 +98,8 @@ function copyCfnTemplate(
},
];

const params = {
appId: getAppId(context),
};

// copy over the files
// @ts-ignore
return context.amplify.copyBatch(context, copyJobs, options, false, params);
return context.amplify.copyBatch(context, copyJobs, options, false);
}

function getAppId(context: $TSContext) {
Expand Down

0 comments on commit 2998e07

Please sign in to comment.