Working on authentication editor data saving workflow.

This commit is contained in:
Matt Scott
2023-04-10 12:49:12 -04:00
parent 0912dd2805
commit 022e780d77
3 changed files with 105 additions and 184 deletions

View File

@@ -1829,11 +1829,20 @@ def setting_authentication():
result=result)
@admin_bp.route('/setting/authentication/api', methods=['GET', 'POST'])
@admin_bp.route('/setting/authentication/api', methods=['POST'])
@login_required
@admin_role_required
def setting_authentication_api():
return Setting().get_group('authentication')
result = {'status': 1, 'messages': [], 'data': {}}
if request.form.get('commit') == '1':
result['messages'].append('Saved successfully.')
else:
result['messages'].append('Loaded successfully.')
result['data'] = Setting().get_group('authentication')
return result
@admin_bp.route('/templates', methods=['GET', 'POST'])