This commit is contained in:
Gert Wohlgemuth 2018-05-23 00:25:51 -07:00
commit 2e3e827bc6
2 changed files with 5 additions and 4 deletions

View File

@ -121,9 +121,8 @@ def code(event, context):
if "Items" in response and len(response['Items']) > 0:
if response['Items'][0]["public"]:
content = urlsafe_b64decode(response['Items'][0]['content'])
return str(content)
content = urlsafe_b64decode(response['Items'][0]['content']).decode('utf-8')
return content
else:
return {
"statusCode": 403,

View File

@ -126,6 +126,7 @@ functions:
path: strategies/{user}/{name}/code
method: get
cors: true
integration: lambda
request:
parameter:
paths:
@ -134,7 +135,8 @@ functions:
response:
headers:
Content-Type: "'text/plain'"
template: $input.path('$')
environment:
strategyTable: ${self:custom.strategyTable}