Improved admin page

This commit is contained in:
2020-05-05 11:37:13 +01:00
parent a2e7ff4def
commit 81a80afdf2
4 changed files with 41 additions and 10 deletions

View File

@@ -181,3 +181,4 @@ class Smtp(Email):
log.error(e.smtp_error)
except:
pass
return False

View File

@@ -197,7 +197,9 @@ def generateInvite():
email = Smtp(address)
email.construct_invite({'expiry': valid_till,
'code': invite['code']})
email.send()
response = email.send()
if response is False or type(response) != bool:
invite['email'] = f'Failed to send to {address}'
try:
with open(config['files']['invites'], 'r') as f:
invites = json.load(f)