@admin_bp.route('/setting/basic/<path:setting>/edit', methods=['POST'])
@login_required
@operator_role_required
def setting_basic_edit(setting):
    jdata = request.json
    new_value = jdata['value']
    result = Setting().set(setting, new_value)
    if result:
        return make_response(jsonify({'status': 'ok', 'msg': 'Toggled setting successfully.'}), 200)
    else:
        return make_response(jsonify({'status': 'error', 'msg': 'Unable to toggle setting.'}), 500)
@admin_bp.route('/setting/basic/<path:setting>/edit', methods=['POST'])
@login_required
@operator_role_required
def setting_basic_edit(setting):
    jdata = request.json
    new_value = jdata['value']
    result = Setting().set(setting, new_value)
    if result:
        return make_response(jsonify({'status': 'ok', 'msg': 'Toggled setting successfully.'}), 200)
    else:
        return make_response(jsonify({'status': 'error', 'msg': 'Unable to toggle setting.'}), 500)