INNER CODE UNIT · TypeScript
filteredMappings
amplify-education/serverless-domain-manager · src/index.ts:419
const filteredMappings = mappings.filter((mapping) => {
if (domain.allowPathMatching) {
return mapping.basePath === domain.basePath;
}
return mapping.apiId === domain.apiId;
});
domain.apiMapping = filteredMappings ? filteredMappings[0] : null;
domain.domainInfo = await apiGateway.getCustomDomain(domain, false);
if (!domain.apiMapping) {
await apiGateway.createBasePathMapping(domain);
} else {
await apiGateway.updateBasePathMapping(domain);
}
})).finally(() => {
Logging.printDomainSummary(this.domains);
});
}