diff options
Diffstat (limited to 'israwhidebroken/controllers.py')
-rw-r--r-- | israwhidebroken/controllers.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/israwhidebroken/controllers.py b/israwhidebroken/controllers.py index 0883216..6e1c90a 100644 --- a/israwhidebroken/controllers.py +++ b/israwhidebroken/controllers.py @@ -27,12 +27,12 @@ class Root(controllers.RootController): trees=Tree.select(Tree.q.compose_id == c)) # JSON RPC calls - @expose("json") + @expose(allow_json=True) def list_tests(self): tests = Test.select() return dict(tests=list(tests)) - @expose("json") + @expose(allow_json=True) def get_trees(self, *args, **kw): qlist = [] for field in 'arch', 'compose_id', 'tree_time', 'repodata_time': @@ -41,7 +41,7 @@ class Root(controllers.RootController): tree_results = Tree.select(' AND '.join(qlist)) return dict(trees=list(tree_results)) - @expose("json") + @expose(allow_json=True) @identity.require(identity.in_group("qa-admin")) def add_tree(self, arch, compose_id, tree_time=None, repodata_time=None): t = Tree(arch=arch, @@ -51,14 +51,14 @@ class Root(controllers.RootController): hub.commit() return dict(tree=t) - @expose("json") + @expose(allow_json=True) @identity.require(identity.in_group("qa")) def add_result(self, treeid, testid, result): tr = TestResult(tree=treeid, test=testid, result=result) hub.commit() # XXX redundant? return dict(id=tr.id) - @expose("json") + @expose(allow_json=True) @identity.require(identity.in_group("qa-admin")) def delete_result(self, id): return dict(youwantedtodelete=id, thisisastub=True) |