You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
179 B

  1. import json
  2. async def process(request):
  3. obj = json.loads(await request.text())
  4. if 'message' in obj:
  5. return f'{obj["title"]} - {obj["message"]}'
  6. else:
  7. return obj['title']