feat: Add promo codes
All checks were successful
Build Docker / Build Image (push) Successful in 21s
All checks were successful
Build Docker / Build Image (push) Successful in 21s
This commit is contained in:
22
account.py
Normal file
22
account.py
Normal 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
|
||||
Reference in New Issue
Block a user