fix: Rate limit discord users
All checks were successful
Build Docker / Build Image (push) Successful in 26s

This commit is contained in:
Nathan Woodburn 2023-11-08 17:59:27 +11:00
parent 6e2f4bd814
commit a271ce9793
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -66,6 +66,13 @@ def gift(name,email,referer, ip,api=False):
if gift['ip'] == ip:
return "You have already submitted a gift request"
if api:
for gift in gifts:
if gift['email'] == email:
return "You have already submitted a gift request"
if gift['name'] == name:
return "You have already submitted a gift request"
# Add the user to the list
gifts.append({
'name': name,