Commit
·
37f93c6
1
Parent(s):
3de4a9a
Update app.py
Browse files
app.py
CHANGED
@@ -19,13 +19,15 @@ def avp():
|
|
19 |
incoming = request.get_json()
|
20 |
print(incoming)
|
21 |
|
22 |
-
response = {
|
|
|
|
|
23 |
|
24 |
-
for key, value in incoming
|
25 |
if value == 0:
|
26 |
-
response[key] = 0
|
27 |
elif value > 0:
|
28 |
-
response[key] = value - 1
|
29 |
|
30 |
return jsonify(response)
|
31 |
if __name__ == '__main__':
|
|
|
19 |
incoming = request.get_json()
|
20 |
print(incoming)
|
21 |
|
22 |
+
response = {
|
23 |
+
"bazis": {}
|
24 |
+
}
|
25 |
|
26 |
+
for key, value in incoming.items():
|
27 |
if value == 0:
|
28 |
+
response["bazis"][key] = 0
|
29 |
elif value > 0:
|
30 |
+
response["bazis"][key] = value - 1
|
31 |
|
32 |
return jsonify(response)
|
33 |
if __name__ == '__main__':
|