mirror of
https://github.com/simple-login/app.git
synced 2024-09-30 05:31:30 +02:00
Handle the case invalid input for /api/apple/update_notification
This commit is contained in:
parent
e50b0d5da5
commit
318b47af36
@ -220,6 +220,14 @@ def apple_update_notification():
|
|||||||
# }
|
# }
|
||||||
LOG.debug("request for /api/apple/update_notification")
|
LOG.debug("request for /api/apple/update_notification")
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
|
if not (
|
||||||
|
data
|
||||||
|
and data.get("unified_receipt")
|
||||||
|
and data["unified_receipt"].get("latest_receipt_info")
|
||||||
|
):
|
||||||
|
LOG.d("Invalid data %s", data)
|
||||||
|
return jsonify(error="Empty Response"), 400
|
||||||
|
|
||||||
transactions = data["unified_receipt"]["latest_receipt_info"]
|
transactions = data["unified_receipt"]["latest_receipt_info"]
|
||||||
|
|
||||||
# dict of original_transaction_id and transaction
|
# dict of original_transaction_id and transaction
|
||||||
|
Loading…
Reference in New Issue
Block a user