feat: Add admin bypass ip
All checks were successful
Build Docker / Build Image (push) Successful in 28s
All checks were successful
Build Docker / Build Image (push) Successful in 28s
This commit is contained in:
parent
c200839b8e
commit
93f9970ca0
2
gift.py
2
gift.py
@ -6,6 +6,7 @@ dotenv.load_dotenv()
|
||||
loaded = False
|
||||
gifts = []
|
||||
|
||||
|
||||
def gift(name,email,referer, ip):
|
||||
global loaded
|
||||
global gifts
|
||||
@ -31,6 +32,7 @@ def gift(name,email,referer, ip):
|
||||
loaded = True
|
||||
|
||||
# Check if the user has already submitted
|
||||
if ip != os.getenv('admin_ip'):
|
||||
for gift in gifts:
|
||||
if gift['email'] == email:
|
||||
return "You have already submitted a gift request"
|
||||
|
Loading…
Reference in New Issue
Block a user