forked from Hay1tsme/artemis
db: Migrate to SQLite, improve performance
This commit is contained in:
@ -227,22 +227,25 @@ class FE_User(FE_Base):
|
||||
usr_sesh = IUserSession(sesh)
|
||||
if usr_sesh.userId == 0:
|
||||
return redirectTo(b"/gate", request)
|
||||
|
||||
|
||||
cards = self.data.card.get_user_cards(usr_sesh.userId)
|
||||
user = self.data.user.get_user(usr_sesh.userId)
|
||||
card_data = []
|
||||
for c in cards:
|
||||
if c['is_locked']:
|
||||
status = 'Locked'
|
||||
elif c['is_banned']:
|
||||
status = 'Banned'
|
||||
if c["is_locked"]:
|
||||
status = "Locked"
|
||||
elif c["is_banned"]:
|
||||
status = "Banned"
|
||||
else:
|
||||
status = 'Active'
|
||||
|
||||
card_data.append({'access_code': c['access_code'], 'status': status})
|
||||
status = "Active"
|
||||
|
||||
card_data.append({"access_code": c["access_code"], "status": status})
|
||||
|
||||
return template.render(
|
||||
title=f"{self.core_config.server.name} | Account", sesh=vars(usr_sesh), cards=card_data, username=user['username']
|
||||
title=f"{self.core_config.server.name} | Account",
|
||||
sesh=vars(usr_sesh),
|
||||
cards=card_data,
|
||||
username=user["username"],
|
||||
).encode("utf-16")
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user