gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-bank] branch master updated: fixing error objects


From: gnunet
Subject: [GNUnet-SVN] [taler-bank] branch master updated: fixing error objects
Date: Thu, 04 May 2017 09:37:48 +0200

This is an automated email from the git hooks/post-receive script.

marcello pushed a commit to branch master
in repository bank.

The following commit(s) were added to refs/heads/master by this push:
     new 50b30d7  fixing error objects
50b30d7 is described below

commit 50b30d7dfc3b1eedad05f4213b6e4aa34e3739a9
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu May 4 09:37:34 2017 +0200

    fixing error objects
---
 talerbank/app/views.py | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 234a3cd..935f22b 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -338,8 +338,7 @@ def history(request):
     user_account = auth_and_login(data["auth"])
 
     if not user_account:
-        return JsonResponse({"outcome": "fail",
-                             "hint": "authentication failed"},
+        return JsonResponse(dict(error="authentication failed"),
                              status=401)
 
     start = data.get("start", 0)
@@ -387,8 +386,7 @@ def auth_and_login(auth_obj):
     """Return user instance after checking authentication
        credentials, False if errors occur"""
     if "basic" != auth_obj["type"]:
-        return JsonResponse({"outcome": "fail",
-                             "hint": "auth method not supported"},
+        return JsonResponse(dict(error="auth method not supported"),
                             status=405)
     try:
         schemas.validate_auth_basic(auth_obj["data"])

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]