mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-01-18 21:32:38 +01:00
For validation
This commit is contained in:
parent
fc9b30bbee
commit
60739a7587
@ -229,7 +229,10 @@ def api_invoices():
|
||||
return jsonify({"ERROR": "MUST BE JSON"}), 400
|
||||
|
||||
postedjson = request.json
|
||||
|
||||
#Form validation
|
||||
if int(postedjson["value"]) < 0 or not postedjson["memo"].replace(' ','').isalnum():
|
||||
return jsonify({"ERROR": "FORM ERROR"}), 401
|
||||
|
||||
if "value" not in postedjson:
|
||||
return jsonify({"ERROR": "NO VALUE"}), 400
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user