Skip to content

Commit

Permalink
fix: skip admin queries when consolidating REST APIs (#7142)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjihrig authored Apr 20, 2021
1 parent f259e5a commit c8069bd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ export function consolidateApiGatewayPolicies(context: $TSContext, stackName: st
const apis = amplifyMeta?.api ?? {};

Object.keys(apis).forEach(resourceName => {
if (resourceName === 'AdminQueries') {
return;
}

const resource = apis[resourceName];
const apiParams = loadApiWithPrivacyParams(context, resourceName, resource);

Expand Down Expand Up @@ -231,7 +235,7 @@ export function loadApiWithPrivacyParams(context: $TSContext, name: string, reso
}

function updateExistingApiCfn(context: $TSContext, api: $TSObject): void {
const { resourceName } = api.params;
const resourceName = api.resourceName || api.params.resourceName;
const resourceDir = getResourceDirPath(context, 'api', resourceName);
const cfnTemplate = path.join(resourceDir, `${resourceName}-cloudformation-template.json`);
const paramsFile = path.join(resourceDir, 'parameters.json');
Expand Down

0 comments on commit c8069bd

Please sign in to comment.