Skip to content

Commit

Permalink
added lambda proxy setting for log endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
troyblank committed May 17, 2020
1 parent 4cef17c commit 56a160f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/log/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export const getLog = () => (
headers: { 'Content-Type': 'application/json' }
})
.then((response) => response.json())
.then((response) => {
const { log } = JSON.parse(response.body);
.then((body) => {
const { log } = body;

dispatch(logReceived(log));
});
Expand Down
4 changes: 4 additions & 0 deletions src/lambdas/halfsies_getLog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ exports.handler = async () => {

const response = {
statusCode,
headers: {
'Access-Control-Allow-Origin': 'https://halfsies.troyblank.com',
'Content-Type': 'application/json'
},
body
};

Expand Down

0 comments on commit 56a160f

Please sign in to comment.