summaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'server.py')
-rw-r--r--server.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.py b/server.py
index f910898..0d0724f 100644
--- a/server.py
+++ b/server.py
@@ -20,8 +20,8 @@ def index():
@post('/shortest-path')
def shortest_path(body):
body = json.loads(body)
- source_id = algorithms.get_closest_node_id(nodes, store.Node(-1, body['lat1'], body['lng1']))
- target_id = algorithms.get_closest_node_id(nodes, store.Node(-1, body['lat2'], body['lng2']))
+ source_id = algorithms.get_closest_node_id(nodes, grid, store.Node(-1, body['lat1'], body['lng1']))
+ target_id = algorithms.get_closest_node_id(nodes, grid, store.Node(-1, body['lat2'], body['lng2']))
path = algorithms.find_shortest_path(nodes, source_id, target_id)
print(path)