[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-bank] branch master updated: wtid -> subject
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-bank] branch master updated: wtid -> subject |
Date: |
Thu, 07 Dec 2017 17:01:08 +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 1625873 wtid -> subject
1625873 is described below
commit 1625873600aee06abd36b70ccd274c250b03ecb2
Author: Marcello Stanisci <address@hidden>
AuthorDate: Thu Dec 7 17:00:52 2017 +0100
wtid -> subject
---
talerbank/app/schemas.py | 4 ++--
talerbank/app/tests.py | 6 +++---
talerbank/app/views.py | 3 ++-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/talerbank/app/schemas.py b/talerbank/app/schemas.py
index df84c93..5fb2ebe 100644
--- a/talerbank/app/schemas.py
+++ b/talerbank/app/schemas.py
@@ -85,7 +85,7 @@ HISTORY_REQUEST_SCHEMA = {
"pattern": "^([0-9]+)$",
"required": False},
"direction": {"type": "string",
- "pattern": "^(debit|credit)$",
+ "pattern": "^(debit|credit)$"}
"required": False},
"account_number": {"type": "string",
"pattern": "^([0-9]+)$",
@@ -97,7 +97,7 @@ INCOMING_REQUEST_SCHEMA = {
"type": "object",
"properties": {
"amount": {"type": AMOUNT_SCHEMA},
- "wtid": {"type": "string"},
+ "subject": {"type": "string"},
"exchange_url": {"type": "string"},
"credit_account": {"type": "integer"},
"auth": AUTH_SCHEMA
diff --git a/talerbank/app/tests.py b/talerbank/app/tests.py
index 815239e..8894cec 100644
--- a/talerbank/app/tests.py
+++ b/talerbank/app/tests.py
@@ -225,7 +225,7 @@ class AddIncomingTestCase(TestCase):
client = Client()
data = '{"auth": {"type": "basic"}, \
"credit_account": 1, \
- "wtid": "TESTWTID", \
+ "subject": "TESTWTID", \
"exchange_url": "https://exchange.test", \
"amount": \
{"value": 1, \
@@ -240,7 +240,7 @@ class AddIncomingTestCase(TestCase):
self.assertEqual(200, response.status_code)
data = '{"auth": {"type": "basic"}, \
"credit_account": 1, \
- "wtid": "TESTWTID", \
+ "subject": "TESTWTID", \
"exchange_url": "https://exchange.test", \
"amount": \
{"value": 1, \
@@ -256,7 +256,7 @@ class AddIncomingTestCase(TestCase):
# Try to go debit
data = '{"auth": {"type": "basic"}, \
"credit_account": 1, \
- "wtid": "TESTWTID", \
+ "subject": "TESTWTID", \
"exchange_url": "https://exchange.test", \
"amount": \
{"value": 50, \
diff --git a/talerbank/app/views.py b/talerbank/app/views.py
index a18c684..b5c3ede 100644
--- a/talerbank/app/views.py
+++ b/talerbank/app/views.py
@@ -450,7 +450,6 @@ def add_incoming(request, user_account):
within the browser, and only over the private admin interface.
"""
data = json.loads(request.body.decode("utf-8"))
- subject = "%s %s" % (data["wtid"], data["exchange_url"])
try:
# Note, this does check the currency.
validate_incoming_request(data)
@@ -458,6 +457,8 @@ def add_incoming(request, user_account):
return JsonResponse({"error": "invalid '%s'" % exc.fieldname},
status=406 if exc.fieldname == "currency" else 400)
+
+ subject = "%s %s" % (data["subject"], data["exchange_url"])
try:
credit_account = BankAccount.objects.get(user=data["credit_account"])
wtrans = wire_transfer(Amount(**data["amount"]),
--
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: wtid -> subject,
gnunet <=