main: Stripe log all requests
All checks were successful
Build Docker / Build Master (push) Successful in 26s
Build Docker / Build Bot (push) Successful in 24s

This commit is contained in:
Nathan Woodburn 2023-08-24 16:25:55 +10:00
parent 5f56c1d0c2
commit d4fd470564
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -235,6 +235,10 @@ def tlsa():
@app.route('/stripe', methods=['POST'])
def stripe():
# Log all requests
print(request.json)
# Log for docker
print(request.json, flush=True)
# Get API header
api_key = request.headers.get('key')
if api_key == None:
@ -242,10 +246,7 @@ def stripe():
if api_key != os.getenv('STRIPE_KEY'):
return jsonify({'error': 'Invalid API key', 'success': 'false'})
# Log all requests
print(request.json)
# Log for docker
print(request.json, flush=True)
return jsonify({'success': 'true'})