From 89c1763911c0938c3953fb488806654b4340eda8 Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sun, 19 Jun 2016 14:06:37 +0200 Subject: Enforce use of new version --- run_server.py | 2 ++ web/js/eventmap.js | 1 + 2 files changed, 3 insertions(+) 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': {} }; -- cgit v1.2.1