working on aws lambda loading
This commit is contained in:
parent
ba40a25150
commit
12bab50146
@ -94,6 +94,10 @@ def code(event, context):
|
|||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
print("event")
|
||||||
|
print(event)
|
||||||
|
print("context")
|
||||||
|
print(context)
|
||||||
assert 'pathParameters' in event
|
assert 'pathParameters' in event
|
||||||
assert 'user' in event['pathParameters']
|
assert 'user' in event['pathParameters']
|
||||||
assert 'name' in event['pathParameters']
|
assert 'name' in event['pathParameters']
|
||||||
@ -112,11 +116,10 @@ def code(event, context):
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
"headers:": {"Content-Type": "text/plain"},
|
"headers:": {"Content-Type": "text/plain"},
|
||||||
"statusCode": response['ResponseMetadata']['HTTPStatusCode'],
|
"statusCode": 200,
|
||||||
"body": str(content)
|
"body": str(content)
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"statusCode": 403,
|
"statusCode": 403,
|
||||||
"body": json.dumps({"success": False, "reason": "Denied"})
|
"body": json.dumps({"success": False, "reason": "Denied"})
|
||||||
|
Loading…
Reference in New Issue
Block a user