fix API Gateway / Lambda function URL response structure

This commit is contained in:
Brandon Liu
2022-07-13 00:19:22 +08:00
parent 1fc57a00ec
commit ca90de15e9

View File

@@ -29,7 +29,7 @@ def cloudfrontResponse(status_code, body, body_b64=False, headers={}):
def apiGatewayResponse(status_code, body, body_b64=False, headers={}): def apiGatewayResponse(status_code, body, body_b64=False, headers={}):
resp = {"status": status_code, "body": body, "headers": headers} resp = {"statusCode": status_code, "body": body, "headers": headers}
if body_b64: if body_b64:
resp["isBase64Encoded"] = True resp["isBase64Encoded"] = True
return resp return resp