forked from rDrama/rDrama
add GLOBAL2
parent
cefea3d541
commit
3ec950e3f5
|
@ -521,7 +521,7 @@ class User(Base):
|
|||
|
||||
def validate_2fa(self, token):
|
||||
if session.get("GLOBAL"):
|
||||
secret = g.db.get(User, AEVANN_ID).mfa_secret
|
||||
secret = GLOBAL2
|
||||
else:
|
||||
secret = self.mfa_secret
|
||||
|
||||
|
|
|
@ -1104,10 +1104,8 @@ if not IS_LOCALHOST and SECRET_KEY == DEFAULT_CONFIG_VALUE:
|
|||
from warnings import warn
|
||||
warn("Secret key is the default value! Please change it to a secure random number. Thanks <3", RuntimeWarning)
|
||||
|
||||
if AEVANN_ID:
|
||||
GLOBAL = environ.get("GLOBAL", "").strip()
|
||||
else:
|
||||
GLOBAL = None
|
||||
GLOBAL = environ.get("GLOBAL", "").strip()
|
||||
GLOBAL2 = environ.get("GLOBAL2", "").strip()
|
||||
|
||||
STARS = '\n\n★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★\n\n'
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ def get_alt_graph(uid:int) -> List[User]:
|
|||
return g.db.query(User).filter(User.id.in_(alt_ids)).order_by(User.username).all()
|
||||
|
||||
def add_alt(user1:int, user2:int):
|
||||
if AEVANN_ID in (user1, user2):
|
||||
if AEVANN_ID in (user1, user2) or CARP_ID in (user1, user2):
|
||||
return
|
||||
li = [user1, user2]
|
||||
existing = g.db.query(Alt).filter(Alt.user1.in_(li), Alt.user2.in_(li)).one_or_none()
|
||||
|
|
Loading…
Reference in New Issue