aboutsummaryrefslogtreecommitdiff
path: root/src/web/lib/utils.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-01 22:47:53 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-03-01 22:47:53 +0100
commit83081ad7e488c44757e43ff40e83458a2e1451ed (patch)
tree176b04327df88b899aa4172aa30d042a0e43b32a /src/web/lib/utils.py
parentUseless if no category set. (diff)
downloadnewspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.gz
newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.tar.bz2
newspipe-83081ad7e488c44757e43ff40e83458a2e1451ed.zip
begin integration of the new architecture
Diffstat (limited to 'src/web/lib/utils.py')
-rw-r--r--src/web/lib/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/web/lib/utils.py b/src/web/lib/utils.py
index 88d24ba5..f2bed3ff 100644
--- a/src/web/lib/utils.py
+++ b/src/web/lib/utils.py
@@ -9,12 +9,12 @@ from flask import request, url_for
logger = logging.getLogger(__name__)
-def default_handler(obj):
+def default_handler(obj, role='admin'):
"""JSON handler for default query formatting"""
if hasattr(obj, 'isoformat'):
return obj.isoformat()
if hasattr(obj, 'dump'):
- return obj.dump()
+ return obj.dump(role=role)
if isinstance(obj, (set, frozenset, types.GeneratorType)):
return list(obj)
if isinstance(obj, BaseException):
bgstack15