def getCustomURL(route):
  print(route)
  print(urllib.parse.urlencode(request.query))
  logging.debug("route = %s, query params = %s" % (route, request.query))
  if route == "join":
    redirected_url = "/#/setup?%s" % (urllib.parse.urlencode(request.query))
  else:
    redirected_url = 'emission://%s?%s' % (route, urllib.parse.urlencode(request.query))
  response.status = 303
  response.set_header('Location', redirected_url)
  # response.set_header('Location', 'mailto://%s@%s' % (route, urllib.urlencode(request.query)))
  logging.debug("Redirecting to URL %s" % redirected_url)
  print("Redirecting to URL %s" % redirected_url)
  return {'redirect': 'success'}
Example #2
0
def getCustomURL(route):
  print(route)
  print(urllib.parse.urlencode(request.query))
  logging.debug("route = %s, query params = %s" % (route, request.query))
  if route == "join":
    redirected_url = "/#/setup?%s" % (urllib.parse.urlencode(request.query))
  else:
    redirected_url = 'emission://%s?%s' % (route, urllib.parse.urlencode(request.query))
  response.status = 303
  response.set_header('Location', redirected_url)
  # response.set_header('Location', 'mailto://%s@%s' % (route, urllib.urlencode(request.query)))
  logging.debug("Redirecting to URL %s" % redirected_url)
  print("Redirecting to URL %s" % redirected_url)
  return {'redirect': 'success'}