summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Sörnäs <gusso230@student.liu.se>2020-11-06 10:33:53 +0100
committerGustav Sörnäs <gusso230@student.liu.se>2020-11-06 10:33:53 +0100
commitb6898e9503fda2b7f7ae4366da0895c0e140c133 (patch)
tree5ed29353b480a88a3c970d797de93622e821b44c
parent7f66e5c211ced9bc0286b893b9a86534fe9ec43a (diff)
downloadtdde25-b6898e9503fda2b7f7ae4366da0895c0e140c133.tar.gz
remobe unnecessary globals
-rw-r--r--server.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/server.py b/server.py
index 6424466..6a93018 100644
--- a/server.py
+++ b/server.py
@@ -17,7 +17,6 @@ def index():
@get('/show-area')
def show_area():
- global nodes
rect = dict()
for (k, node) in enumerate(store.select_nodes_in_rectangle(nodes, 58.3984, 58.3990, 15.5733, 15.576)):
rect[node.id] = node.coord_tuple()
@@ -26,7 +25,6 @@ def show_area():
@post('/shortest-path')
def shortest_path(body):
- global nodes
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']))