Skip to content

Commit 246aa78

Browse files
committed
enable site_base_url in admin_get_post
1 parent 85dd6fa commit 246aa78

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

install/install_API_Gateway_definitions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@
445445
}
446446
},
447447
"requestTemplates": {
448-
"application/json": "{\n \"signing_key\": \"${stageVariables.signing_key}\",\n \"posts_table\": \"${stageVariables.posts_table}\",\n \"token_name\": \"${stageVariables.token_name}\",\n\n \"articles_bucket\": \"${stageVariables.articles_bucket}\",\n \"articles_bucket_path\": \"${stageVariables.articles_bucket_path}\",\n\n \"cookie\": \"$input.params('Cookie')\",\n \n \"post_id\": $input.json(\"$.post_id\")\n}"
448+
"application/json": "{\n \"site_base_url\": \"${stageVariables.site_base_url}\",\n \"signing_key\": \"${stageVariables.signing_key}\",\n \"posts_table\": \"${stageVariables.posts_table}\",\n \"token_name\": \"${stageVariables.token_name}\",\n\n \"articles_bucket\": \"${stageVariables.articles_bucket}\",\n \"articles_bucket_path\": \"${stageVariables.articles_bucket_path}\",\n\n \"cookie\": \"$input.params('Cookie')\",\n \n \"post_id\": $input.json(\"$.post_id\")\n}"
449449
},
450450
"uri": "",
451451
"passthroughBehavior": "when_no_templates",
@@ -1120,4 +1120,4 @@
11201120
"title": "Empty Schema"
11211121
}
11221122
}
1123-
}
1123+
}

lambdas/src/admin/get_post_admin.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var dynamoObjects = require('../../lib/dynamoObjects.js');
1313

1414
exports.handler = (event, context, callback) => {
1515
// STAGE VARIABLES FROM API GATEWAY
16+
var site_base_url = event.site_base_url;
1617
var stage = event.stage;
1718
var signing_key = event.signing_key;
1819
var cookie = event.cookie;

0 commit comments

Comments
 (0)