diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-10-24 18:33:03 +0200 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-10-24 18:33:03 +0200 |
commit | f9c9409967a7ae9c0776cbb1a51d47ac5c16a395 (patch) | |
tree | 6b6daa2a43bdc6fe2c261266149d20adfc9a7e4b | |
parent | dc7a4d7c212a57e3f909e86c6aad38ee83ae3d8d (diff) |
init: Add new bisect route.
Change-Id: I3669b16b6b429d1ff04129387e3c4a8f08b2e945
-rw-r--r-- | app/dashboard/__init__.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/dashboard/__init__.py b/app/dashboard/__init__.py index b86738c..3ed6056 100644 --- a/app/dashboard/__init__.py +++ b/app/dashboard/__init__.py @@ -48,6 +48,7 @@ from dashboard.views.job import ( ) from utils.backend import ( ajax_batch_post, + ajax_bisect, ajax_count_get, ajax_get, ) @@ -236,3 +237,17 @@ def ajax_batch(): abort(400) else: abort(400) + + +@app.route('/_ajax/bisect/<string:collection>/<string:doc_id>') +def ajax_bisect_call(collection=None, doc_id=None): + if validate_csrf(request.headers.get('X-Csrftoken', None)): + if all([collection, doc_id]): + return ajax_bisect( + request, collection, doc_id, + app.config.get('BISECT_API_ENDPOINT') + ) + else: + abort(400) + else: + abort(400) |