[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: use auth_and_login as d
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: use auth_and_login as decorator |
Date: |
Mon, 06 Nov 2017 18:48:37 +0100 |
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 5b27b30 use auth_and_login as decorator
5b27b30 is described below
commit 5b27b3052bf480117551a0df958d61f004896b06
Author: Marcello Stanisci <address@hidden>
AuthorDate: Mon Nov 6 18:48:04 2017 +0100
use auth_and_login as decorator
---
talerbank/app/views.py | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index 83ccc3f..4f0dc44 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -321,15 +321,11 @@ def serve_public_accounts(request, name=None):
return render(request, "public_accounts.html", context)
@require_GET
-def serve_history(request):
address@hidden
+def serve_history(request, user_account):
"""
This API is used to get a list of transactions related to one user.
"""
- # login caller
- user_account = auth_and_login(request)
- if not user_account:
- return JsonResponse(dict(error="authentication failed: bad credentials
OR auth method"),
- status=401)
# delta
delta = request.GET.get("delta")
if not delta:
@@ -514,10 +510,10 @@ def withdraw_nojs(request):
def wire_transfer(amount, debit_account, credit_account, subject):
LOGGER.info("%s => %s, %s, %s" %
- (debit_account.account_no,
- credit_account.account_no,
- amount.stringify(2),
- subject))
+ (debit_account.account_no,
+ credit_account.account_no,
+ amount.stringify(2),
+ subject))
if debit_account.pk == credit_account.pk:
LOGGER.error("Debit and credit account are the same!")
raise SameAccountException()
--
To stop receiving notification emails like this one, please contact
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] [taler-bank] branch master updated: use auth_and_login as decorator,
gnunet <=