summaryrefslogtreecommitdiff
path: root/talerbank/app/schemas.py
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-02-05 10:47:23 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-02-05 10:47:23 +0100
commit860d826caf185c7d259c00c3dd0d9c6820d5d192 (patch)
treeee28880c6ed7ce654654c528ec9cf23c2b1815e5 /talerbank/app/schemas.py
parentd129b8569e2ef3309c0f9a60d9f826018128cd79 (diff)
downloadbank-860d826caf185c7d259c00c3dd0d9c6820d5d192.tar.gz
bank-860d826caf185c7d259c00c3dd0d9c6820d5d192.tar.bz2
bank-860d826caf185c7d259c00c3dd0d9c6820d5d192.zip
adapting to new amount format <curr>:x.y
Diffstat (limited to 'talerbank/app/schemas.py')
-rw-r--r--talerbank/app/schemas.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/talerbank/app/schemas.py b/talerbank/app/schemas.py
index 269d791..1ddb684 100644
--- a/talerbank/app/schemas.py
+++ b/talerbank/app/schemas.py
@@ -54,6 +54,7 @@ class JSONFieldException(ValueError):
self.http_status_code = http_status_code
super().__init__()
+'''
AMOUNT_SCHEMA = {
"type": "object",
"properties": {
@@ -62,7 +63,11 @@ AMOUNT_SCHEMA = {
"currency": {"type": "string",
"pattern": "^"+settings.TALER_CURRENCY+"$"}
}
-}
+}'''
+
+AMOUNT_SCHEMA = {
+ "type": "string",
+ "pattern": "^"+settings.TALER_CURRENCY+":([0-9]+)\.?([0-9]+)?$"}
WITHDRAW_SESSION_SCHEMA = {
"type": "object",