diff --git a/main.py b/main.py index 1c0a7bf..0a3f0c5 100644 --- a/main.py +++ b/main.py @@ -82,7 +82,7 @@ def application(env, re): except: re("400 Bad Request", []) yield "

400 Bad Request

".encode() - yield "The \"count\" value must be a value between 0 and 10." + yield "The \"count\" value must be a value between 0 and 10.".encode() return try: @@ -90,11 +90,17 @@ def application(env, re): except: re("400 Bad Request", []) yield "

400 Bad Request

".encode() - yield "The \"date\" value must be in DD.MM.YYYY format, the \"time\" value must be in HH:MM format." + yield "The \"date\" value must be in DD.MM.YYYY format, the \"time\" value must be in HH:MM format.".encode() return via = list(args["via"]) if "via" in args else None + if via and len(via) > 3: + re("400 Bad Request", []) + yield "

400 Bad Request

".encode() + yield "It is not possible to route through more than three \"via\" stations.".encode() + return + try: output = workers.conn.worker(frm, to, count, outtime, mode, details, json, via) except Exception as e: