Add pw reset support; add logging

This commit is contained in:
2020-04-12 21:25:27 +01:00
parent 2e22e5f840
commit d22ba6133b
12 changed files with 680 additions and 27 deletions

View File

@@ -1,6 +1,7 @@
from pathlib import Path
from flask import Flask, send_from_directory, render_template
from __main__ import config, app, g
from __main__ import web_log as log
@app.errorhandler(404)
@@ -29,6 +30,7 @@ from jellyfin_accounts.web_api import checkInvite
@app.route('/invite/<path:path>')
def inviteProxy(path):
if checkInvite(path):
log.info(f'Invite {path} used to request form')
return render_template('form.html',
contactMessage=config['ui']['contact_message'],
helpMessage=config['ui']['help_message'],
@@ -37,5 +39,6 @@ def inviteProxy(path):
elif 'admin.html' not in path and 'admin.html' not in path:
return app.send_static_file(path)
else:
log.debug('Attempted use of invalid invite')
return render_template('invalidCode.html',
contactMessage=config['ui']['contact_message'])