summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2016-06-19 14:06:37 +0200
committerChristian Franke <nobody@nowhere.ws>2016-06-19 14:06:53 +0200
commit89c1763911c0938c3953fb488806654b4340eda8 (patch)
tree4064ac75583a3b5df4b25529d96523fb3649cf94
parentd4e3c6a6ec8ced228831dd09fd301d23b1ac45b2 (diff)
Enforce use of new version
-rw-r--r--run_server.py2
-rw-r--r--web/js/eventmap.js1
2 files changed, 3 insertions, 0 deletions
diff --git a/run_server.py b/run_server.py
index f62c398..c29ccdf 100644
--- a/run_server.py
+++ b/run_server.py
@@ -92,6 +92,8 @@ class EventMapMarkerApi(object):
with self.marker_doc.lock:
if self.marker_doc.cur['sync-id'] != doc['sync-id']:
raise cherrypy.HTTPError(503, "Sorry, but the server database changed in between.")
+ if 'version' not in doc or doc['version'] != '23.0':
+ raise cherrypy.HTTPError(503, "Sorry, but your local script is out of date. Please reload.")
self.marker_doc.set_data(data)
cherrypy.response.headers['Content-Type']= 'application/json'
return '{}'
diff --git a/web/js/eventmap.js b/web/js/eventmap.js
index 85c7e08..8d09a19 100644
--- a/web/js/eventmap.js
+++ b/web/js/eventmap.js
@@ -28,6 +28,7 @@ function active_layer_info() {
function eventmap_send_update() {
var update_doc = {
'sync-id': marker_store_sync_id,
+ 'version': '23.0',
'markers': {}
};