]> git.cworth.org Git - turbot/blobdiff - turbot_lambda/turbot_lambda.py
Switch to parse the x-www-form-urlencoded data in Python
[turbot] / turbot_lambda / turbot_lambda.py
index c2459e879f04e7912380c2eb5602a385387253fd..f3d28f25f7abb6a0afde786d246c0c1ff29ee93c 100644 (file)
@@ -1,3 +1,4 @@
+from urllib.parse import parse_qs
 from turbot.rot import rot
 
 def turbot_lambda(event, context):
@@ -6,7 +7,8 @@ def turbot_lambda(event, context):
     Currently only calls into the rot() function but may become more
     sophisticated later on."""
 
-    result = rot(event['args'])
+    body = parse_qs(event['body'])
+    result = rot(body['text'][0])
 
     return {
         'statusCode': 200,