Skip to content
Snippets Groups Projects
Commit ac6a1b3d authored by lazarog98's avatar lazarog98
Browse files

Merge branch '4-debug-tool-start-end-date' into 'main'

Resolve "[DEBUG TOOL] Start/end date"

Closes #4

See merge request !23
parents 0a4aa647 256ba748
No related branches found
No related tags found
1 merge request!23Resolve "[DEBUG TOOL] Start/end date"
...@@ -15,8 +15,8 @@ class OwnRoutingEngine(RoutingEngine): ...@@ -15,8 +15,8 @@ class OwnRoutingEngine(RoutingEngine):
response = requests.post(self.api_url, headers=headers, data=self.__build_payload()) response = requests.post(self.api_url, headers=headers, data=self.__build_payload())
parsed_response = response.json() parsed_response = response.json()
if isinstance(parsed_response, list): if isinstance(parsed_response, dict):
return parsed_response return parsed_response.get('route', [])
return [] return []
...@@ -32,5 +32,7 @@ class OwnRoutingEngine(RoutingEngine): ...@@ -32,5 +32,7 @@ class OwnRoutingEngine(RoutingEngine):
'lat': end[0], 'lon': end[1] 'lat': end[0], 'lon': end[1]
}, },
'forbidden': [], 'forbidden': [],
'start_after_today': 0,
'end_after_today': 6
} }
return json.dumps(payload) return json.dumps(payload)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment