feat: Add promo codes
All checks were successful
Build Docker / Build Image (push) Successful in 21s

This commit is contained in:
2024-02-15 11:58:22 +11:00
parent 9b7089fe7c
commit f5f4addd74
10 changed files with 476 additions and 26 deletions

22
account.py Normal file
View File

@@ -0,0 +1,22 @@
import os
import dotenv
import random
dotenv.load_dotenv()
EMAIL = os.getenv('LOGIN_EMAIL')
PASSWORD = os.getenv('LOGIN_PASSWORD')
tokens = []
def login(email, password):
if email == EMAIL and password == PASSWORD:
token = str(random.randint(100000, 999999))
tokens.append(token)
return token
return False
def token(token):
if token in tokens:
return True
return False