Skip to content

Commit

Permalink
Merge branch 'master' into SDE-139-individual-lambda-iam-roles
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverForeman committed Aug 21, 2019
2 parents ca0fec0 + 5a843c0 commit fd81ec6
Show file tree
Hide file tree
Showing 7 changed files with 4,375 additions and 1,385 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"env": {
"commonjs": true,
"es6": true,
"node": true
"node": true,
"jest": true
},
"extends": ["airbnb-base"],
"globals": {
Expand Down
11 changes: 11 additions & 0 deletions aws-infrastructure/aws-infrastructure.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,14 @@ module "ssm_s3_arn_parameter" {
type = "String"
value = module.s3-bucket.arn
}

module "ssm_s3_bucket_site_url_parameter" {
source = "./modules/ssm_parameter"
name_prefix = local.name_prefix
project = var.project
environment = var.environment
name = "s3-bucket-site-url"
description = "The S3 bucket site url for the SDE project"
type = "String"
value = module.s3-bucket-site.cdn_domain_name
}
12 changes: 12 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current'
}
}
]
]
};
6 changes: 4 additions & 2 deletions common/digestEmailHtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const createPostOutput = ({

const createDigestSection = result => (
`
<h3>New posts matching your digests for <i>${result.searchTerms.join(', ')}</i>:</h3>
<h3>New posts matching your digests for <i>${result.searchTerms.map(term => `<a href="http://${process.env.WEBSITE_LINK_URL}/?search=${term}">${term}</a>`).join(', ')}</i>:</h3>
${result.posts.map(post => createPostOutput(post))}
`
);
Expand All @@ -32,7 +32,9 @@ export default results => (
<title>Your digest</title>
</head>
<body>
${results.map(result => createDigestSection(result))}
${results.map(result => createDigestSection(result)).join('')}
<hr />
<p>If you wish to unsubscribe please click <a href="http://${process.env.WEBSITE_LINK_URL}/?unsubscribe=true">here</a>.</p>
</body>
</html>
`
Expand Down
Loading

0 comments on commit fd81ec6

Please sign in to comment.