Spaces:
Sleeping
Sleeping
Commit
·
65d61ae
1
Parent(s):
4b3cb4a
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,13 +22,13 @@ def avp():
|
|
| 22 |
print(incoming)
|
| 23 |
result = {}
|
| 24 |
for key, value in incoming.items():
|
| 25 |
-
if value.isdigit():
|
| 26 |
if int(value) > 0:
|
| 27 |
result[key] = str(int(value) - 1)
|
| 28 |
else:
|
| 29 |
result[key] = "0"
|
| 30 |
else:
|
| 31 |
-
result[key] = "0"
|
| 32 |
response = jsonify(result)
|
| 33 |
return response
|
| 34 |
except Exception as e:
|
|
|
|
| 22 |
print(incoming)
|
| 23 |
result = {}
|
| 24 |
for key, value in incoming.items():
|
| 25 |
+
if value.isdigit():
|
| 26 |
if int(value) > 0:
|
| 27 |
result[key] = str(int(value) - 1)
|
| 28 |
else:
|
| 29 |
result[key] = "0"
|
| 30 |
else:
|
| 31 |
+
result[key] = "0"
|
| 32 |
response = jsonify(result)
|
| 33 |
return response
|
| 34 |
except Exception as e:
|