aboutsummaryrefslogtreecommitdiff
path: root/app/handlers/token.py
diff options
context:
space:
mode:
authorMilo Casagrande <milo.casagrande@linaro.org>2014-09-11 16:20:22 +0200
committerMilo Casagrande <milo.casagrande@linaro.org>2014-09-11 16:20:22 +0200
commit4fc369af8d87fede67f117ecb3eb5af37877275e (patch)
tree24c492b22faacc6c766ee8d5c9a5954144c5e7f2 /app/handlers/token.py
parent27c5e61b102e9a520a640d7d44b35866c694de47 (diff)
handlers: Refactor common methods into module.
* Move all the handlers common methods into a single module (making them "static"). * Refactor methods and tests. * Add new tests. Change-Id: Ied713e6d5a9d4c16dcc27794509bdc6dd1193c1f
Diffstat (limited to 'app/handlers/token.py')
-rw-r--r--app/handlers/token.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/handlers/token.py b/app/handlers/token.py
index 996184c..822266d 100644
--- a/app/handlers/token.py
+++ b/app/handlers/token.py
@@ -24,6 +24,7 @@ from tornado.web import (
from urlparse import urlunparse
from handlers.base import BaseHandler
+from handlers.common import get_query_fields
from handlers.decorators import protected_th
from handlers.response import HandlerResponse
from models import (
@@ -114,7 +115,7 @@ class TokenHandler(BaseHandler):
self.collection,
doc_id,
field=TOKEN_KEY,
- fields=self._get_query_fields()
+ fields=get_query_fields(self.get_query_arguments)
)
if result: