|
@@ -93,7 +93,6 @@ def mgmt():
|
|
|
all_cats = current_app.config['ALL_CAT']
|
|
all_cats = current_app.config['ALL_CAT']
|
|
|
points_interval = current_app.config['POINTS_INTERVAL']
|
|
points_interval = current_app.config['POINTS_INTERVAL']
|
|
|
points_award = current_app.config['POINTS_AWARD']
|
|
points_award = current_app.config['POINTS_AWARD']
|
|
|
- follow_points = current_app.config['FOLLOW_POINTS']
|
|
|
|
|
gunicorn_logging = current_app.config['GUNICORN']
|
|
gunicorn_logging = current_app.config['GUNICORN']
|
|
|
prefix = current_app.config['PREFIX']
|
|
prefix = current_app.config['PREFIX']
|
|
|
access_id = current_app.config['ACCESS_ID']
|
|
access_id = current_app.config['ACCESS_ID']
|
|
@@ -115,8 +114,7 @@ def mgmt():
|
|
|
kofi_token,
|
|
kofi_token,
|
|
|
kofi_integration,
|
|
kofi_integration,
|
|
|
announce_enable,
|
|
announce_enable,
|
|
|
- announce_interval,
|
|
|
|
|
- follow_points
|
|
|
|
|
|
|
+ announce_interval
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
return render_template('mgmt.html',
|
|
return render_template('mgmt.html',
|
|
@@ -165,7 +163,6 @@ def user_panel():
|
|
|
username = request.args.get('username')
|
|
username = request.args.get('username')
|
|
|
points_interval = current_app.config['POINTS_INTERVAL']
|
|
points_interval = current_app.config['POINTS_INTERVAL']
|
|
|
points_award = current_app.config['POINTS_AWARD']
|
|
points_award = current_app.config['POINTS_AWARD']
|
|
|
- follow_points = current_app.config['FOLLOW_POINTS']
|
|
|
|
|
if username is not None:
|
|
if username is not None:
|
|
|
users = get_all_users_by_name(db, username)
|
|
users = get_all_users_by_name(db, username)
|
|
|
else:
|
|
else:
|
|
@@ -185,7 +182,6 @@ def user_panel():
|
|
|
username=username,
|
|
username=username,
|
|
|
users=users,
|
|
users=users,
|
|
|
instance=instance,
|
|
instance=instance,
|
|
|
- follow_points=follow_points,
|
|
|
|
|
utc_timezone=utc_timezone)
|
|
utc_timezone=utc_timezone)
|
|
|
|
|
|
|
|
|
|
|
|
@@ -325,7 +321,6 @@ def settings():
|
|
|
owncast_url = request.form['owncast_url']
|
|
owncast_url = request.form['owncast_url']
|
|
|
kofi_integration = 'kofi_integration' in request.form
|
|
kofi_integration = 'kofi_integration' in request.form
|
|
|
kofi_token = request.form['kofi_token']
|
|
kofi_token = request.form['kofi_token']
|
|
|
- follow_points = request.form['follow_points']
|
|
|
|
|
config_dict = {
|
|
config_dict = {
|
|
|
'POINTS_INTERVAL': points_interval,
|
|
'POINTS_INTERVAL': points_interval,
|
|
|
'POINTS_AWARD': points_award,
|
|
'POINTS_AWARD': points_award,
|
|
@@ -335,8 +330,7 @@ def settings():
|
|
|
'ACCESS_TOKEN': access_token,
|
|
'ACCESS_TOKEN': access_token,
|
|
|
'OWNCAST_URL': owncast_url,
|
|
'OWNCAST_URL': owncast_url,
|
|
|
'KOFI_TOKEN': kofi_token,
|
|
'KOFI_TOKEN': kofi_token,
|
|
|
- 'KOFI_INTEGRATION': kofi_integration,
|
|
|
|
|
- 'FOLLOW_POINTS': follow_points
|
|
|
|
|
|
|
+ 'KOFI_INTEGRATION': kofi_integration
|
|
|
}
|
|
}
|
|
|
if save_config(config_dict): # Save new config.py
|
|
if save_config(config_dict): # Save new config.py
|
|
|
current_app.logger.info('Saved new config.')
|
|
current_app.logger.info('Saved new config.')
|