diff options
author | Milo Casagrande <milo.casagrande@linaro.org> | 2014-07-29 15:23:26 +0200 |
---|---|---|
committer | Milo Casagrande <milo.casagrande@linaro.org> | 2014-07-29 15:23:26 +0200 |
commit | c5e56a2c12d8a6407b1eeb474a475545083a4f20 (patch) | |
tree | d09e87b287ad46f899c677e0111cd8b77059e444 /app/urls.py | |
parent | 501026ff24b5b8e16442e29a9a7f9e82ab85fdf6 (diff) |
Change JSON keys validator logic.
* Now if not all the valid keys are in the JSON object,
but the one available are valid, the JSON object is valid.
Single handlers need to implement more detailed validation.
Change-Id: I93d4778bbfdff983bbcc19d5331370202bb47062
Diffstat (limited to 'app/urls.py')
-rw-r--r-- | app/urls.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/urls.py b/app/urls.py index 5cf4f8c..810ba9e 100644 --- a/app/urls.py +++ b/app/urls.py @@ -19,10 +19,11 @@ from tornado.web import url from handlers import ( BootHandler, + CountHandler, DefConfHandler, JobHandler, SubscriptionHandler, - CountHandler, + TokenHandler, ) _JOB_URL = url(r'/api/job(?P<sl>/)?(?P<id>.*)', JobHandler, name='job') @@ -38,6 +39,9 @@ _BOOT_URL = url(r'/api/boot(?P<sl>/)?(?P<id>.*)', BootHandler, name='boot') _COUNT_URL = url( r'/api/count(?P<sl>/)?(?P<collection>.*)', CountHandler, name='count' ) +_TOKEN_URL = url( + r'/api/token(?P<sl>/)?(?P<id>.*)', TokenHandler, name='token' +) APP_URLS = [ _BOOT_URL, @@ -45,4 +49,5 @@ APP_URLS = [ _DEFCONF_URL, _JOB_URL, _SUBSCRIPTION_URL, + _TOKEN_URL, ] |