fix: Update logging
All checks were successful
Build Docker / Build Image (push) Successful in 20s

This commit is contained in:
Nathan Woodburn 2023-11-07 23:11:08 +11:00
parent 37ee3e747a
commit f1d1504657
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 8 additions and 6 deletions

10
gift.py
View File

@ -10,10 +10,10 @@ def gift(name,email,referer, ip):
global loaded
global gifts
print("Name: " + name)
print("Email: " + email)
print("Referer: " + referer)
print("IP: " + ip)
print("Name: " + name,flush=True)
print("Email: " + email,flush=True)
print("Referer: " + referer,flush=True)
print("IP: " + ip,flush=True)
path = '/data/gifts.json'
if os.getenv('local') == 'true':
@ -46,5 +46,5 @@ def gift(name,email,referer, ip):
# Save the file
with open(path, 'w') as f:
json.dump(gifts, f)
return True

View File

@ -35,7 +35,9 @@ def submit():
hidden = 'None'
status = gift.gift(name, email, hidden, ip)
print(status)
print(status,flush=True)
print(request.headers,flush=True)
if status == True:
return render_template('success.html')
else: